4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started by: trash on July 26, 2002, 08:41:41 PM
-
Hi,
Check:
http://xander.mine.nu/details.php?image_id=107
I want to show the thumbnail of the next file, but if it has no thumbnail, I want to show the media icon for it. Is there a variable for it? Or do I have to customize?
cheers,
Trash
-
No, you find a little bug ;)
Open details.php and replace line:
$next_thumb_file = (is_remote($next_prev_cache[$next_image_id]['image_thumb_file'])) ? $next_prev_cache[$next_image_id]['image_thumb_file'] : THUMB_PATH."/".$cat_id."/".$next_prev_cache[$next_image_id]['image_thumb_file'];
with:
if (empty($next_prev_cache[$next_image_id]['image_thumb_file'])) {
$next_thumb_file = ICON_PATH."/".get_file_extension($next_prev_cache[$next_image_id]['image_media_file']).".gif";
}
else {
$next_thumb_file = (is_remote($next_prev_cache[$next_image_id]['image_thumb_file'])) ? $next_prev_cache[$next_image_id]['image_thumb_file'] : THUMB_PATH."/".$cat_id."/".$next_prev_cache[$next_image_id]['image_thumb_file'];
}
then replace this line:
$prev_thumb_file = (is_remote($next_prev_cache[$prev_image_id]['image_thumb_file'])) ? $next_prev_cache[$prev_image_id]['image_thumb_file'] : THUMB_PATH."/".$cat_id."/".$next_prev_cache[$prev_image_id]['image_thumb_file'];
with:
if (empty($next_prev_cache[$prev_image_id]['image_thumb_file'])) {
$prev_thumb_file = ICON_PATH."/".get_file_extension($next_prev_cache[$prev_image_id]['image_media_file']).".gif";
}
else {
$prev_thumb_file = (is_remote($next_prev_cache[$prev_image_id]['image_thumb_file'])) ? $next_prev_cache[$prev_image_id]['image_thumb_file'] : THUMB_PATH."/".$cat_id."/".$next_prev_cache[$prev_image_id]['image_thumb_file'];
}
Will be fixed in next versions.
Greets Jan
-
thnx Jan, works like a charm :)
I was already looking for the code to lookup the icon file, but you beat me to it.... :)
thnx...