4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started by: Chris on May 15, 2002, 05:36:41 AM
-
In version 1.0, I enhanced details.php to return new variables 'next_image2' and 'next_image3'. This was so I could display the previous and next 3 image thumbnails to the user for navigational purposes.
I don't know PHP but I am make my living as a programmer. It was easy enough for me to figure out that this data was already available in the cache.
Under 1.5 beta, this cache seems to have been removed. I spent a couple hours yesterday trying to figure out how to accomplish the same thing but failed.
Does anyone know if it's possible to copy and hack these sections of code to get the next 3 images instead of just the next 1 image?
details.php
-----------
$order = ($config['image_sort'] == "DESC") ? "DESC" : "ASC";
$condition = ($order == "DESC") ? "<" : ">";
$row = $site_db->query_firstrow("SELECT image_id AS next_image_id
FROM ".IMAGES_TABLE."
WHERE ".$config['image_order']." $condition '".$search_key."' AND cat_id = $cat_id AND image_active = 1
ORDER BY ".$config['image_order']." $order
LIMIT 1");
$next_image_id = (!empty($row['next_image_id'])) ? $row['next_image_id'] : 0;
$next_image_name = REPLACE_EMPTY;
$next_image_url = REPLACE_EMPTY;
$next_image_file = REPLACE_EMPTY;
$next_thumb_file = REPLACE_EMPTY;
...
// Get next and previous image
if (!empty($image_row[$next_image_id])) {
$next_image_name = stripslashes($image_row[$next_image_id]['image_name']);
$next_image_url = $site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$next_image_id);
$next_image_file = (is_remote($image_row[$next_image_id]['image_media_file'])) ? $image_row[$next_image_id]['image_media_file'] : MEDIA_PATH."/".$cat_id."/".$image_row[$next_image_id]['image_media_file'];
$next_thumb_file = (is_remote($image_row[$next_image_id]['image_thumb_file'])) ? $image_row[$next_image_id]['image_thumb_file'] : THUMB_PATH."/".$cat_id."/".$image_row[$next_image_id]['image_thumb_file'];
}
It's the LIMIT 1 and query_firstrow() I couldn't figure out how to replace (I think)
Here is a screen shot to illustrate what I'm trying to do:
(http://www.Chris.net/details.jpg)
The 2nd and 3rd '190-14' should be '190-15' and '190-16'.
(I only blurred the URL because my site isn't public yet. Too much work to do before going live.)
-
i have exactly the same problem..
i want more then next & previous image on the details page / for example the next 3 thumbnails...
could anybody help me??? please :D
-
me too intrested in this
or even like on Sir V@no's site ;)
-
I would like this too!
-
this is an exaple of what could be great!
http://www.newbiesinc.com/CATS.jpg
or something like merging categories.html and details.html
help us please!
-
Nothing new on this topic ? I was looking to modify the scipt to add some navigation arrows and I saw the thumbnail script. Is there anyway to activate it ?
I.m using 4images 1.7.6
It would sufice me just 1 iteneration, no necesary three.
-
What about this - [MOD] Photo Preview Hack (http://www.4homepages.de/forum/index.php?topic=7294.msg124362#msg124362)?