Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - V@no

Pages: [1] 2 3 4 5 ... 14
1
Since v1.7.7 4images supports conditional tags that can be used to display/hide content depend on which page is opened:
Quote from: changes in v1.7.6
- Added more conditional tags (categories, details,index, member, postcards, register, search, top) for using {if index}...{if index} for homepage, {if details}...{endif details} for details.php page, etc.
On some pages these tags will not work "properly", because they are overwritten by other parts of the script.

The fix:
Open includes/page_header.php
Find:
4images v1.7.7
$list = array("categories""details""index""member""postcards""register""search""top");
$array = array();
foreach (
$list as $name)
{
  
$array[$name] = ($name == $file);
}


4images v1.7.8 - 1.7.9
$array = array(
    
"categories" => false,
    
"details"    => false,
    
"index"      => false,
    
"member"     => false,
    
"postcards"  => false,
    
"register"   => false,
    
"search"     => false,
    
"top"        => false
);
if ( isset(
$array[$file]) ) {
  
$array[$file] = true;
}



Replace with:
$array = array(
    
"page_categories" => false,
    
"page_details"    => false,
    
"page_index"      => false,
    
"page_lightbox"   => false,
    
"page_member"     => false,
    
"page_postcards"  => false,
    
"page_register"   => false,
    
"page_search"     => false,
    
"page_top"        => false
);
if ( isset(
$array["page_" $file]) ) {
  
$array["page_" $file] = true;
}


4images v1.7.8 - 1.7.9
Open lightbox.php
Find:
define('ROOT_PATH''./');

Insert below :below::
define('MAIN_SCRIPT'__FILE__);

After these changes you can use in templates:
{page_categories}
{page_details}
{page_index}
{page_lightbox}
{page_member}
{page_postcards}
{page_register}
{page_search}
{page_top}

For example you can display text only on details.php page:
Code: [Select]
{if page_details}this is details.php page{endif page_details}
Or you can display text on all pages except register.php:
Code: [Select]
{ifno page_register}this is not register.php page{endifno page_register}

3
Bug Fixes & Patches / [1.7.8] Support for PHP4
« on: September 17, 2010, 02:52:04 PM »
If after upgrade or fresh installation you are getting white page or error message:
Quote
Fatal error: call to undefined function: date_default_timezone_set() in ...

The fix is the following:

In includes/functions.php find:
?>

Insert above :above::
if (!function_exists("date_default_timezone_set"))
{
  function 
date_default_timezone_set($timezone)
  {
    return 
true;
  }
}


Then open config.php if you find a line with date_default_timezone_set then insert above :above::
if (function_exists("date_default_timezone_set"))

4
Chit Chat / Page translation
« on: September 17, 2010, 03:02:00 AM »
As many of you might know we have a page translation tool on top of each page, by default it shows at top-right corner, but if you click on icon, then it transforms into a thin "toolbar" (unless you are using IE6 which is not supported).
That toolbar now can be set to autohide itself, by checking the checkbox on left side, it also can be relocated to the bottom of the page by clicking on icon on right side.

I've added support for Bing translation, however I couldn't figure out how to make it work to translate selected text. It seems Bing doesn't support GET type of submission as Google does, it requires POST. So for now, Bing translation works for the entire page only.

5
In 4images v1.7.8 new feature was introduced, that filters filenames, making them lower case. This was done so transfer 4images from case sensitive type servers (UNIX/Linux/Mac) to Windows would be with no problems.

The fix is the following:
in includes/upload.php find:
      $this->name $regs[1];
      
preg_match("/(.+)\.(.+)/"$this->HTTP_POST_FILES[$this->field_name]['name'], $regs);
      
$this->extension $regs[2];


Replace it with:
      $this->name filterFileName($regs[1]);
      
preg_match("/(.+)\.(.+)/"$this->HTTP_POST_FILES[$this->field_name]['name'], $regs);
      
$this->extension strtolower($regs[2]);



Find:
      $this->file_name $this->HTTP_POST_FILES[$this->field_name]['name'];
      
$this->file_name str_replace(" ""_"$this->file_name);
      
$this->file_name str_replace("%20""_"$this->file_name);
      
$this->file_name preg_replace("/[^-\._a-zA-Z0-9]/"""$this->file_name);


Replace it with:
      $this->file_name filterFileName($this->HTTP_POST_FILES[$this->field_name]['name']);

6
Bug Fixes & Patches / [1.7.1 - 1.7.8] Can't login
« on: August 25, 2010, 04:45:35 AM »
On some servers this "bug" won't let login into 4images unless selected "Log me on automatically next visit" checkbox at members login form. It only affects some servers that for some reason return text value of boolean settings in php.ini Technically this is not 4images fault, because according PHP documentation register_globals is a boolean value, and in documentation for ini_get() states:
Quote
   Note: When querying boolean values
A boolean ini value of off will be returned as an empty string or "0" while a boolean ini value of on will be returned as "1". The function can also return the literal string of INI value.



The fix is simple:
in includes/sessions.php find:
    if (@ini_get('register_globals')) {

Replace with:
    $register_globals strtolower(@ini_get('register_globals'));
    if (
$register_globals && $register_globals != "off" && $register_globals != "false") {

7
When 4images is setup to use compression (Settings -> Use GZip compression), the database backup compresses backup files into .gz files and thes files not being showed in backup list.

The fix is simple:
in admin/backup.php find:
    if (is_file(ROOT_PATH.DATABASE_DIR."/".$file) && $file != "." && $file != ".." && preg_match("/\.sql$/i",$file)) {

Replace it with:
    if (is_file(ROOT_PATH.DATABASE_DIR."/".$file) && $file != "." && $file != ".." && preg_match("/\.sql/i",$file)) {

8
When images AND thumbnails uploaded via FTP and then used ACP (Admin Control Panel) -> Check new images, images will be added into 4images without thumbnails.

In admin/checkimages.php find:

	
	
	
	
	
$image_media_file_backup $image_media_file;
	
	
	
	
	
$image_thumb_file "";


Replace with:
	
	
	
	
	
$image_media_file_backup $image_media_file;



P.S.
thanks to denisnovikov for finding the cause of this bug.

9
When trying edit media/* templates (ACP -> Edit Template) 4images might return unpredictable results, such as error messages or template being saved in template directory instead of media/

In admin/templates.php find:
  $template_file_name basename($template_file_name);

Replace with:
  $template_file_name = (strpos($template_file_name'media/') !== false 'media/' '') . basename($template_file_name);

10
Chit Chat / Posts marked as "spam" - what does it mean?
« on: June 04, 2010, 01:50:28 AM »
A new mod to fight spam is installed. This mod checks every new posts/replies for possible spam. Unfortunately as anything else it's not perfect. There is a chance that your post/reply can be falsely flagged as spam.

In case your post got flagged as spam:

1) DO NOT worry, it will be unflagged shortly (the same day at most).
2) DO NOT attempt send same message again with slight modifications in hope to by-pass the filter (it might create confusion after messages got unflagged)
3) DO NOT PM moderators/administrators
4) DO NOT start new topic regarding your flagged message.


Current version of the mod does not allow forum moderators moderate flagged messages, that means the unflagging process might have lag. Hopefully it will change soon.



11
In some rare cases uploading thumbnail might fail, because the code that checks thumbnail's MIME type totally ignores MIME type that is set in includes/upload_definitions.php

In includes/upload.php find:
    foreach ($mime_type_match as $key => $val) {

Insert below:
      if (in_array($key$this->accepted_extensions['thumb'])) {
        if (
is_array($val)) {
          foreach (
$val as $key2 => $val2) {
            
$this->accepted_mime_types['thumb'][] = $val2;
          }
        }
        else {
          
$this->accepted_mime_types['thumb'][] = $val;
        }
      }



If you wish, you can safely delete this block of code as it's not being used anymore:
    //Thumbnails
    
$this->accepted_mime_types['thumb'] = array(
      
"image/jpg",
      
"image/jpeg",
      
"image/pjpeg",
      
"image/gif",
      
"image/x-png"
    
);

12
This little annoyance could produce unnecessary warning messages on search page even when such messages were disabled in global.php

In search.php delete this line:
error_reporting(E_ALL);

13
These messages showed on servers with PHP v5.3 or newer and 4images v1.7.7 or older.
There is nothing to worry about, as it is not errors, just warnings that meant to be for developers.

It will be fixed in 4images v1.7.8.

Until then the messages can be turned off by replacing in global.php
error_reporting(E_ERROR E_WARNING E_PARSE);

with this:
error_reporting(E_ERROR E_WARNING E_PARSE & ~E_DEPRECATED);


In search.php delete:
error_reporting(E_ALL);

14
Chit Chat / Attachments inline view
« on: September 30, 2009, 07:37:34 AM »
Attachments inline view - view text attachment without downloading them as file.

The changes for SMF v1.1.10 see in first 3 attachments.

15
Chit Chat / Go direct to moved topic test
« on: September 08, 2009, 12:05:56 AM »
this is a test message, originally was posted in test section and was moved here.

Pages: [1] 2 3 4 5 ... 14
Post your comments here