News:

CPG Release 1.6.29
During HTML5 upload, keep pseudo blank code 200 messages from triggering error condition
added Russian language
correct failure to use theme menu icons in album manager
minor vulnerabilities mitigation

Main Menu

Last Updated Albums

Started by Forgott3n, August 04, 2008, 04:47:02 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Forgott3n

Hello,

at http://gallery.avrilbandaids.com we've added the most recently update albums to the main page. However the "views" underneath show the views for the image displayed and not for the entire album. Is there a way to determine and show the total amount of views per album and integrate that into the "lastalb" block.

Thank you.

Joachim Müller

No, as cpg1.4.x doesn't record views per album.

Forgott3n

Do you plan to implement this in future versions?

Αndré

Open include/functions.inc.php

Find:
$query = "SELECT *,{$CONFIG['TABLE_ALBUMS']}.title AS title,{$CONFIG['TABLE_ALBUMS']}.aid AS aid FROM {$CONFIG['TABLE_PICTURES']},{$CONFIG['TABLE_ALBUMS']} WHERE {$CONFIG['TABLE_PICTURES']}.aid = {$CONFIG['TABLE_ALBUMS']}.aid AND approved = 'YES' $META_ALBUM_SET GROUP BY {$CONFIG['TABLE_PICTURES']}.aid ORDER BY {$CONFIG['TABLE_PICTURES']}.ctime DESC $limit";

Replace with:
$query = "SELECT *,{$CONFIG['TABLE_ALBUMS']}.title AS title,{$CONFIG['TABLE_ALBUMS']}.aid AS aid, SUM(hits) AS hits FROM {$CONFIG['TABLE_PICTURES']},{$CONFIG['TABLE_ALBUMS']} WHERE {$CONFIG['TABLE_PICTURES']}.aid = {$CONFIG['TABLE_ALBUMS']}.aid AND approved = 'YES' $META_ALBUM_SET GROUP BY {$CONFIG['TABLE_PICTURES']}.aid ORDER BY {$CONFIG['TABLE_PICTURES']}.ctime DESC $limit";

Forgott3n

Thanks so much for that help!