Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Possible to Add Slideshow Links to Gallery Main Page or Thumbnail Page?  (Read 4593 times)

0 Members and 1 Guest are viewing this topic.

coastal

  • Coppermine newbie
  • Offline Offline
  • Posts: 2

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!
Logged

OmegaGOD

  • Supporter
  • Coppermine frequent poster
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 346
  • I approve.
Re: Possible to Add Slideshow Links to Gallery Main Page or Thumbnail Page?
« Reply #1 on: October 20, 2004, 12:05:21 pm »

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
Logged
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

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Possible to Add Slideshow Links to Gallery Main Page or Thumbnail Page?
« Reply #2 on: October 21, 2004, 05:20:40 am »

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
Code: [Select]
$thumb_list[$i]['caption'] = $row['caption_text'];and add after it (in a new line)
Code: [Select]
$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
Logged

coastal

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Possible to Add Slideshow Links to Gallery Main Page or Thumbnail Page?
« Reply #3 on: October 21, 2004, 10:57:15 pm »

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!
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Possible to Add Slideshow Links to Gallery Main Page or Thumbnail Page?
« Reply #4 on: October 22, 2004, 07:21:58 am »

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

Joachim
Logged
Pages: [1]   Go Up
 

Page created in 0.027 seconds with 19 queries.