4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: uploadeur on July 07, 2011, 12:49:55 PM
-
Hi,
When we are at the final image at a category, tehre is no Next button for sure. But i want to circle the thing and A Next button in the final image for the first image of the same category. How can i do this next/prev image circulation?
-
Hi!
1.) search in details.php:
$next_image_id = (isset($image_id_cache[$act_key + 1])) ? $image_id_cache[$act_key + 1] : 0;
$prev_image_id = (isset($image_id_cache[$act_key - 1])) ? $image_id_cache[$act_key - 1] : 0;
and replace:
$last_key = count($image_id_cache) - 1;
$next_image_id = (isset($image_id_cache[$act_key + 1])) ? $image_id_cache[$act_key + 1] : $image_id_cache[0];
$prev_image_id = (isset($image_id_cache[$act_key - 1])) ? $image_id_cache[$act_key - 1] : $image_id_cache[$last_key];
search and remove or comment out:
if ($break) {
break;
}
if ($prev_id == $image_id) {
$break = 1;
}
$prev_id = $row['image_id'];
mfg Andi
-
I think you get the point. But you coded uncorrectly i think. :) Because after this edit, there wasn't the previous(never) button and at the last image of the category the next button didnt work; but at the last imge of the category has a next button, this is good, but not fully correct. :)
-
any other ideas?
-
update, test it...
-
nothing changed. it was same like default details.php... :(
-
UP
-
works great
-
Hi!
Code update, now it works correctly.
mfg Andi