number of last uploads (not on the frontpage!) number of last uploads (not on the frontpage!)
 

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

number of last uploads (not on the frontpage!)

Started by michiel, July 29, 2005, 03:50:10 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

michiel

I have organized my site in this way:
- on the frontpage http://www.dwaalgasten.nl/Foto/cpg1.3.3/cpg133/index.php you see only the albums
- through a link on the frontpage ("nieuw" = new) you will enter the last uploads on a separate page
My question is: how to put a maximum to the number of last upload pics on this page (I would like to only show the latest 4 pics)?
As far as I can see, there is no way I can do this in the Config in the Admin Menu; there it is only possible to limit the number of pics when they show on the frontpage. How do I change the number of pics if last uploads are shown on another page?
Thanks!

Nibbler

That should be controlled with the options on the config page:

Number of columns on thumbnail page
Number of rows on thumbnail page

michiel

I tried that one as well. When I choose "1 row, 4 collum", I get the "new"  page with 4 pics in a row, but also it is inicated that this is page 1, and that there is a page 2, etc. In other words: all pics that are added are show, on an unlimited number of pages with 4 pics. But I would like to have only a single page with the latest 4 pics. What can I do to prevent that more than 1 page is made? Thanks again for your help!

Nibbler

OK, you'll need to edit include/functions.inc.php

look under case 'lastup':

and find:

$result = db_query("SELECT COUNT(*) from {$CONFIG['TABLE_PICTURES']} WHERE approved = 'YES' $ALBUM_SET");
$nbEnr = mysql_fetch_array($result);
$count = $nbEnr[0];
mysql_free_result($result);


and change it to
$count = 4;

michiel

Hi Nibbler, thanks, exactly what i was looking for!

michiel

My statisfaction proved to be premature..... Whereas the number of "last upload" pics (tab "nieuw") is now limited to 3 (which was my objective), it appears that the number of pics gathered in a specific album (tab "albums")" is now also limited to three on a page.... Which means that an album with more than 3 pics is spread over several pages (which is not my intention). So the question is: how can I limit the number of pics on the "last upload" page to three in total, whereas all the pics within a separate album appear on a single page (without limitation on the number of pics)? Here are some links:
index page: http://www.dwaalgasten.nl/Foto/cpg1.3.3/cpg133/index.php
last upload page: http://www.dwaalgasten.nl/Foto/cpg1.3.3/cpg133/thumbnails.php?album=lastup&cat=0
example of album page with more than three pics: http://www.dwaalgasten.nl/Foto/cpg1.3.3/cpg133/thumbnails.php?album=6
Thanks!

Nibbler

My modification only affects the last uploads album. (assuming you applied it correctly)