Limit no of latest additions shown Limit no of latest additions shown
 

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

Limit no of latest additions shown

Started by COS@RIN, November 08, 2005, 12:22:21 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

COS@RIN

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

Nibbler


COS@RIN

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

Nibbler

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


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


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

COS@RIN

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