4images Forum & Community
The forum for all 4images gallery administrators
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
[2023-01-23] 4images 1.10 released
Home
Help
Search
Login
Register
4images Forum & Community
»
4images Modifications / Modifikationen
»
Mods & Plugins (Releases & Support)
(Moderator:
mawenzi
) »
[Mod] Previous Next Image Circle Circulation
« previous
next »
Print
Pages: [
1
]
Author
Topic: [Mod] Previous Next Image Circle Circulation (Read 15244 times)
0 Members and 1 Guest are viewing this topic.
uploadeur
Newbie
Posts: 47
[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?
Logged
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
»
Logged
uploadeur
Newbie
Posts: 47
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.
Logged
uploadeur
Newbie
Posts: 47
Re: Previous Next Image Circle Circulation
«
Reply #3 on:
July 11, 2011, 09:40:18 PM »
any other ideas?
Logged
Rembrandt
Guest
Re: Previous Next Image Circle Circulation
«
Reply #4 on:
July 12, 2011, 05:07:46 AM »
update, test it...
Logged
uploadeur
Newbie
Posts: 47
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...
Logged
uploadeur
Newbie
Posts: 47
Re: Previous Next Image Circle Circulation
«
Reply #6 on:
September 07, 2011, 12:42:24 PM »
UP
Logged
zimba
Newbie
Posts: 33
Re: Previous Next Image Circle Circulation
«
Reply #7 on:
October 19, 2011, 12:50:15 PM »
works great
Logged
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
Logged
Print
Pages: [
1
]
« previous
next »
4images Forum & Community
»
4images Modifications / Modifikationen
»
Mods & Plugins (Releases & Support)
(Moderator:
mawenzi
) »
[Mod] Previous Next Image Circle Circulation