Author Topic: [Mod] Own Thumbnails instead standard *.gif images on your detail page  (Read 5013 times)

0 Members and 1 Guest are viewing this topic.

Rembrandt

  • Guest
Hi!

In 4images Gallery is standard, if you upload other files as "gif, jpg, jpeg ,png" images on your detail page is always a standard gif.
With this Mod you can show thumbnails instead the standard *.gifs

1.) search in includes/functions.php:

"image" => get_media_code($image_row['image_media_file'], $image_row['image_id'], $image_row['cat_id'], $image_row['image_name'], $mode$show_link$detailed_view),

and replace:

"image" => get_media_code($image_row['image_media_file'], $image_row['image_thumb_file'], $image_row['image_id'], $image_row['cat_id'], $image_row['image_name'], $mode$show_link$detailed_view),

1.2) search:

function get_media_code($media_file_name$image_id 0$cat_id 0$image_name ""$mode ""$show_link 0$detailed_view 0) {

and replace:

function get_media_code($media_file_name$thumb_file_name ""$image_id 0$cat_id 0$image_name ""$mode ""$show_link 0$detailed_view 0) {

1.3) search:

$media_icon 
"<img src=\"".ICON_PATH."/".$file_extension.".gif\" border=\"0\" alt=\"".format_text($image_name2)."\" />";

and replace:

//################# Start Own Thumbnails instead standard  *.gif ########################### 
  
if(!empty($thumb_file_name)){
    if( 
check_thumb_type($media_src) == 1){
      
$media_icon "<img src=\"".ICON_PATH."/".$file_extension.".gif\" border=\"0\" alt=\"".format_text($image_name2)."\" />";
    }
    else{
     
$media_icon "<img src=\"".get_file_path($thumb_file_name"thumb"$cat_id01)."\" border=\"0\" alt=\"".format_text($image_name2)."\" />";
    }
  }
  else{
    
$media_icon "<img src=\"".ICON_PATH."/".$file_extension.".gif\" border=\"0\" alt=\"".format_text($image_name2)."\" />";
  }
//################## End Own Thumbnails instead standard  *.gif ############################ 


As Example: upload a *.zip file and any thumbnail, now with the modification, the thumbnail image displayed on the detail page, instead the standard *.gif

mfg Andi