Is it possible to have last created albums instead of last updated albums? - I find myself adding photos to very old albums, and it looks as if I have a gallery that hasn't been updated in a while (even though the dates underneath). I would still like to have the most recent stuff first.
http://forum.coppermine-gallery.net/index.php/topic,63706.0.html
Quote from: Αndré on February 11, 2010, 03:34:53 PM
- newalb: New albums (differs from 'lastalb', as it uses chosen album thumbnail as thumbnail and also its upload time instead of the upload time of the latest file)
Quote from: Αndré on August 15, 2014, 10:52:20 AM
http://forum.coppermine-gallery.net/index.php/topic,63706.0.html
Thankyou. I have tried this but it doesn't seem to work. There is nothing that shows up/no group of albums.
Sorry, it's a plugin. I'll install it first, that might help. :)
Third reply; sorry.
I installed it. It's showing up with no titles and albums that I have created last year (that I added to today). I might not be working with the latest coppermine?
If I remember correctly you need to set an album thumbnail. If you set "random thumbnail", the album won't appear in the list.
Quote from: Αndré on August 15, 2014, 11:58:36 AM
If I remember correctly you need to set an album thumbnail. If you set "random thumbnail", the album won't appear in the list.
Yes, that fixed it :) How do I add the title? People don't know what album they're clicking on?
For some reason it works out of the box in my live gallery, but I get the same result like you in my testbed (probably related to the gallery settings). However, we can fix this in the plugin code.
Open codebase.php, find
$query = "SELECT p.*, alb_hits AS hits FROM {$CONFIG['TABLE_PICTURES']} AS p
INNER JOIN {$CONFIG['TABLE_ALBUMS']} AS r ON r.aid = p.aid
$RESTRICTEDWHERE
AND approved = 'YES'
AND p.pid = r.thumb
ORDER BY ctime DESC
{$meta['limit']}";
$result = cpg_db_query($query);
$rowset = cpg_db_fetch_rowset($result);
mysql_free_result($result);
build_caption($rowset, array('ctime'));
break;
case 'randalb': // Random albums
and replace with
$query = "SELECT p.*, alb_hits AS hits, r.title as title FROM {$CONFIG['TABLE_PICTURES']} AS p
INNER JOIN {$CONFIG['TABLE_ALBUMS']} AS r ON r.aid = p.aid
$RESTRICTEDWHERE
AND approved = 'YES'
AND p.pid = r.thumb
ORDER BY ctime DESC
{$meta['limit']}";
$result = cpg_db_query($query);
$rowset = cpg_db_fetch_rowset($result);
mysql_free_result($result);
build_caption($rowset, array('ctime', 'title'));
break;
case 'randalb': // Random albums
Perfect! Thankyou! :)
Please
Quote from: Joachim Müller on September 28, 2008, 12:46:26 PM
tag your thread as "solved" by clicking on the "Topic Solved" button on the bar at the left hand side at the bottom of your thread.