My gallery http://www.paulgulliver.co.uk/Coppermine/index.php?cat=0
How many files are held in the last uploads album. When I can on mine (from the album menu) I seem to get all the uploads I've done across several pages
Yes, that's how it works.
Ok, I just assumed it would show the last 'X' number of thumbnails and then remove older ones as new ones were uploaded. I was hoping to set it up to show those uploaded in, say, the last 30 days so that returning users would be find new uploads quickly.
You have to modify the appropriate queries in include/functions.inc.php. Search for 'lastup' (including the quotation marks).
Quote from: Αndré on November 07, 2010, 06:51:24 PM
You have to modify the appropriate queries in include/functions.inc.php.
If anyone could offer some help here in modifing the query. that would be appreciated
Paul
Find
$query = "SELECT COUNT(*)
FROM {$CONFIG['TABLE_PICTURES']} AS r
INNER JOIN {$CONFIG['TABLE_ALBUMS']} AS a ON a.aid = r.aid
$RESTRICTEDWHERE
AND approved = 'YES'";
and replace with
$query = "SELECT COUNT(*)
FROM {$CONFIG['TABLE_PICTURES']} AS r
INNER JOIN {$CONFIG['TABLE_ALBUMS']} AS a ON a.aid = r.aid
$RESTRICTEDWHERE
AND approved = 'YES'
AND ctime > UNIX_TIMESTAMP() - 60*60*24*30";
Find
$query = "SELECT $select_columns
FROM {$CONFIG['TABLE_PICTURES']} AS r
INNER JOIN {$CONFIG['TABLE_ALBUMS']} AS a ON a.aid = r.aid
$RESTRICTEDWHERE
AND approved = 'YES'
ORDER BY r.pid $DESC $limit";
and replace with
$query = "SELECT $select_columns
FROM {$CONFIG['TABLE_PICTURES']} AS r
INNER JOIN {$CONFIG['TABLE_ALBUMS']} AS a ON a.aid = r.aid
$RESTRICTEDWHERE
AND approved = 'YES'
AND ctime > UNIX_TIMESTAMP() - 60*60*24*30
ORDER BY r.pid $DESC $limit";
Find
$query = "SELECT COUNT(*) FROM {$CONFIG['TABLE_PICTURES']} AS p
INNER JOIN {$CONFIG['TABLE_ALBUMS']} AS r ON r.aid = p.aid
$RESTRICTEDWHERE
AND approved = 'YES'
AND pid > $pid";
and replace with
$query = "SELECT COUNT(*) FROM {$CONFIG['TABLE_PICTURES']} AS p
INNER JOIN {$CONFIG['TABLE_ALBUMS']} AS r ON r.aid = p.aid
$RESTRICTEDWHERE
AND approved = 'YES'
AND ctime > UNIX_TIMESTAMP() - 60*60*24*30
AND pid > $pid";
Thanks for that, just what I needed.
Paul