coppermine-gallery.com/forum

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Installation & Setup => Topic started by: michiel on July 29, 2005, 03:50:10 PM

Title: number of last uploads (not on the frontpage!)
Post by: michiel on July 29, 2005, 03:50:10 PM
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!
Title: Re: number of last uploads (not on the frontpage!)
Post by: Nibbler on July 29, 2005, 04:03:42 PM
That should be controlled with the options on the config page:

Number of columns on thumbnail page
Number of rows on thumbnail page
Title: Re: number of last uploads (not on the frontpage!)
Post by: michiel on July 29, 2005, 04:50:34 PM
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!
Title: Re: number of last uploads (not on the frontpage!)
Post by: Nibbler on July 29, 2005, 04:59:05 PM
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;
Title: Re: number of last uploads (not on the frontpage!)
Post by: michiel on July 29, 2005, 09:15:57 PM
Hi Nibbler, thanks, exactly what i was looking for!
Title: Re: number of last uploads (not on the frontpage!)
Post by: michiel on July 31, 2005, 08:02:33 AM
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!
Title: Re: number of last uploads (not on the frontpage!)
Post by: Nibbler on July 31, 2005, 01:16:48 PM
My modification only affects the last uploads album. (assuming you applied it correctly)