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: Limit no of latest additions shown  (Read 2898 times)

0 Members and 1 Guest are viewing this topic.

COS@RIN

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 24
    • Cosarin Internet
Limit no of latest additions shown
« on: November 08, 2005, 12:22:21 am »

Hi folks.

Hope someone can help.

I am using this photograph for........ yes you guessed it......a photo gallery.

I am using a simple HTML homepage with links to various albums within the gallery.

I have added a link to the homepage that shows the lates additions in the thumnail view.

The liink I used is:

http://seasonalimages.cosarin-design.com/gallery/thumbnails.php?album=lastup

This works fine for the pupose of showing the latest additions album, but I noticed that in the config section you can change the number of latest addition images shown in the album list page. Can I add a parameter to the link to show only the latest 6 uploaded images rather than every single file I have ever uploaded? Obviously I want to be able to add this parameter into my link. Or is there another way to do this?

I hope you can help.

COS@RIN
« Last Edit: November 08, 2005, 06:30:39 am by Nibbler »
Logged

Nibbler

  • Guest
Re: Limit no of latest additions shown
« Reply #1 on: November 08, 2005, 04:18:11 am »

There's no support for 1.4....
Logged

COS@RIN

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 24
    • Cosarin Internet
Re: Limit no of latest additions shown
« Reply #2 on: November 08, 2005, 06:02:39 am »

I appreciate that there is currently no support for 1.4,

But I am looking for the same support for 1.3.

I hope you can help!

COS@RIN
Logged

Nibbler

  • Guest
Re: Limit no of latest additions shown
« Reply #3 on: November 08, 2005, 06:14:12 am »

OK, then you need to be looking in thumbnails.php, here:

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

You can add in a facility to override the default number of columns and rows of thumbnails. The last parameter is whether or not you want pagination. You could do this for example

Code: [Select]
if (isset($_GET['numrows'])){
display_thumbnails($album, (isset($cat) ? $cat : 0), $page, $CONFIG['thumbcols'], (int) $_GET['numrows'], false);
} else {
display_thumbnails($album, (isset($cat) ? $cat : 0), $page, $CONFIG['thumbcols'], $CONFIG['thumbrows'], true);
}

That would allow you to use a link like thumbnails.php?album=lastup&numrows=3
Logged

COS@RIN

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 24
    • Cosarin Internet
Re: Limit no of latest additions shown
« Reply #4 on: November 08, 2005, 06:26:51 am »

Nibbler.

I really appreciate your help on this one.

I can confirm that this has worked a treat in 1.3

I know there is no support for 1.4 at this time, but for the purpose of future reffernece it works a treat in 1.4 as well.

Thank you again, and keep up the good (excelent) work.

True Regards

COS@RIN
Logged
Pages: [1]   Go Up
 

Page created in 0.035 seconds with 20 queries.