Author Topic: [Mod] Previous Next Image Circle Circulation  (Read 15206 times)

0 Members and 1 Guest are viewing this topic.

Offline uploadeur

  • Newbie
  • *
  • Posts: 47
    • View Profile
[Mod] Previous Next Image Circle Circulation
« 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?

Rembrandt

  • Guest
Re: [Mod] Previous Next Image Circle Circulation
« Reply #1 on: July 07, 2011, 05:56:46 PM »
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
« Last Edit: August 25, 2012, 08:22:39 PM by Rembrandt »

Offline uploadeur

  • Newbie
  • *
  • Posts: 47
    • View Profile
Re: Previous Next Image Circle Circulation
« Reply #2 on: July 08, 2011, 08:05:33 PM »
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. :)

Offline uploadeur

  • Newbie
  • *
  • Posts: 47
    • View Profile
Re: Previous Next Image Circle Circulation
« Reply #3 on: July 11, 2011, 09:40:18 PM »
any other ideas?

Rembrandt

  • Guest
Re: Previous Next Image Circle Circulation
« Reply #4 on: July 12, 2011, 05:07:46 AM »
update, test it...

Offline uploadeur

  • Newbie
  • *
  • Posts: 47
    • View Profile
Re: Previous Next Image Circle Circulation
« Reply #5 on: July 13, 2011, 05:32:54 AM »
nothing changed. it was same like default details.php... :(

Offline uploadeur

  • Newbie
  • *
  • Posts: 47
    • View Profile
Re: Previous Next Image Circle Circulation
« Reply #6 on: September 07, 2011, 12:42:24 PM »
UP

Offline zimba

  • Newbie
  • *
  • Posts: 33
    • View Profile
Re: Previous Next Image Circle Circulation
« Reply #7 on: October 19, 2011, 12:50:15 PM »
works great

Rembrandt

  • Guest
Re: [Mod] Previous Next Image Circle Circulation
« Reply #8 on: August 23, 2012, 06:12:55 PM »
Hi!

Code update, now it works correctly.

mfg Andi