Possible to Add Slideshow Links to Gallery Main Page or Thumbnail Page? Possible to Add Slideshow Links to Gallery Main Page or Thumbnail Page?
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Possible to Add Slideshow Links to Gallery Main Page or Thumbnail Page?

Started by coastal, October 19, 2004, 11:22:03 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

coastal

Hi there,

Have been trying to figure this out on my own for a few hours but I'm stumped.

I'd like to add a link that takes visitors directly into a gallery's slideshow. Ideally this link would be situated on the gallery's main page (text link below each gallery's key thumbnail) but if it easier, perhaps on each gallery's thumbnail page beside the gallery's title.

I've figured out where I need to insert the code, but just can't seem to figure out how to generate the dynamic link to each gallery's respective slide show.

Any ideas or experience with this or something similar?

Thanks!

OmegaGOD

Yes it is possible! That's the good news :-) Bad news is, its manual, so you will have to do this to each album. Probably the easiest bet is to place the link in the album description. You may be able to have CPG dynamically generate this link. I don't forsee it being that hard, but it's 6:05AM EST and I need to sleep :-)
You will notice when browsing through the gallery that each album has a unique album number. If you look at the URL for each album, ie. http://www.yourname.com/gallery/displayimage.php?album=9&pos=1, you can see that this specific album is indexed as album #9. Just insert the hyperlink http://www.yourname.com/gallery/displayimage.php?album=9&slideshow=3000. This will be the slideshow URL for that album.
Just enter &slideshow=TT after the album index number, where TT is the time in milliseconds for the slideshow delay.

Hope this helps,

--OmegaGOD
Please do not PM me with support questions. Please read the manual and then if posting questions please place them in the proper sub-boards.

Joachim Müller

OmegaGOD is right, the method he describes is correct. To add this automatically, you edit include/functions.inc.php, find the first occurence (within the function definition display_thumbnails) of $thumb_list[$i]['caption'] = $row['caption_text'];and add after it (in a new line)$thumb_list[$i]['caption'] .= '<br/><a href="displayimage.php?album='.$row['aid'].'&slideshow=5000">Start slideshow</a>';(not tested though, please report if this works for you).

Joachim

coastal

Thanks for your replies guys!

Omega's solution provides the exact results I'm looking for but I'm setting this gallery up for a friend and don't want to have too complex an instruction set for him to follow.

GauGau, your solution works very well by adding a slideshow link below each thumbnail in the album.

Is it possible to move the code to a different location so it will be displayed only once, say beside the album's title such as in Omega's solution? I will work to find this myself but just wanted to ask in case you already know to where it should be moved. :)

Thanks again!

Joachim Müller

The place to add the link is in themes/yourtheme/theme.php, somewhere after// HTML template for thumbnails displayYou'll have to come up with some placeholder in curly braces that has to be defined elsewhere. look for foreach($thumb_list as $thumb) {and put the definition after it somewhere.

Joachim