forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: Sarre on January 06, 2006, 09:18:42 pm

Title: How to use thumbnails as previous/next buttons
Post by: Sarre on January 06, 2006, 09:18:42 pm
Hi,

When looking at a photo, I would like to have a thumbnail of the previous photo as a link to that previous photo, and a thumbnail of the next photo as a link to that next photo.
How should I do this?

Thanks,
Sarre
Title: Re: How to use thumbnails as previous/next buttons
Post by: ecto on January 06, 2006, 10:31:12 pm
An easy "solution" would be to enable the film strip (in Config -> Image view) and set "Number of items in film strip" to 3. You would then have "kind of" a navigation below the picture.. not complete or a "real" solution, but it might suffice?
Title: Re: How to use thumbnails as previous/next buttons
Post by: Sarre on January 06, 2006, 10:36:56 pm
I've been thinking of that allready, but I'm affraid it wouldn't help, as I need to be able to position the images at the top of the page...

What I need to know, is how to pass the url of the previous image and the url of the next image into the $template_img_navbar block.
Perhaps changing the filmstrip code somewhat might work, but I have no idea how to do that...

Thanks for the answer though!
Title: Re: How to use thumbnails as previous/next buttons
Post by: ecto on January 06, 2006, 11:05:47 pm
As some kind of start for further coding, $params in function theme_html_img_nav_menu() should include new keys, like NEXT_THUMB_URL and PREV_THUMB_URL. Then just edit $template_img_navbar to include that instead of the standard {LOCATION}images/next.gif.

Question is, as you say, how to get the URL's of prev and next thumbnails to populate $params. I haven't looked into that, dunno if I have the time..
Title: Re: How to use thumbnails as previous/next buttons
Post by: Sarre on January 07, 2006, 08:38:14 pm
Hi
I took a new look into the filmstrip function, and managed to change it so that it only shows the previous and next thumbnail!
Thanks for the advice!