Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: clickable random thumbs on every cpg page  (Read 3301 times)

0 Members and 1 Guest are viewing this topic.

michael singer

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 42
  • random image from: www.a-visual-notebook.at
    • a visual notebook
clickable random thumbs on every cpg page
« on: November 25, 2004, 05:22:27 pm »

apart from being displayed at the cpg homepage, how can (linked) random thumbnails be shown also on the pages that are generated to display the main image and the filmstrip?  in other words, i would like to have random thumbs on EVERY page of my gallery.

is there a way?

i was searching the forum, but  this seems not to have been asked yet.
« Last Edit: December 03, 2004, 05:33:54 pm by GauGau »
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: clickable random thumbs on every cpg page
« Reply #1 on: November 26, 2004, 01:37:18 am »

This function is the function that is resposible for generating the thumbnails that are in the random block.

Code: [Select]
function display_thumbnails($album, $cat, $page, $thumbcols, $thumbrows, $display_tabs)

This is the line we need to place in a couple files:

Code: [Select]
display_thumbnails('random', $cat, 1, $CONFIG['thumbcols'], 1, false);

Note: if you want to override the number of columns that are in the config: change "$CONFIG['thumbcols']" to that number.
And the following field is how many rows. Default is normally two, but I just did "1" in this example.

This line will display one row of random thumbnails from your current category.

You'll need to put it in a couple places to accomplish a random block on every page down to the intermediate picture.


Find in thumbnails.php, normally at line 135

Code: [Select]
display_thumbnails($album, (isset($cat) ? $cat : 0), $page, $CONFIG['thumbcols'], $CONFIG['thumbrows'], true);
pagefooter();

change to:

Code: [Select]
display_thumbnails($album, (isset($cat) ? $cat : 0), $page, $CONFIG['thumbcols'], $CONFIG['thumbrows'], true);
display_thumbnails('random', $cat, 1, $CONFIG['thumbcols'], 1, false);
pagefooter();

find in displayimage.php, normally at line 641:

Code: [Select]
   theme_display_image($nav_menu, $picture, $votes, $pic_info, $comments, $film_strip);
    pagefooter();

change to:

Code: [Select]
   theme_display_image($nav_menu, $picture, $votes, $pic_info, $comments, $film_strip);
    display_thumbnails('random', $cat, 1, $CONFIG['thumbcols'], 1, false);
    pagefooter();
Logged

michael singer

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 42
  • random image from: www.a-visual-notebook.at
    • a visual notebook
Re: clickable random thumbs on every cpg page
« Reply #2 on: November 27, 2004, 11:18:22 am »

thank you so much, donnoman!

it's only now that i read your reply, sorry for the delay, i forgot to activate the notification function for this thread.
your mod works really great!
thanks a lot for the help!

michael
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: clickable random thumbs on every cpg page
« Reply #3 on: November 27, 2004, 08:39:03 pm »

Glad to hear it, your welcome.
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 19 queries.