ok, since there was no answer I had to venture myself into this even more, and after so many days and hours of reserching and trial and error I managed to get what I wanted, I'll post it here so others can see it and use it if they want.
I first changed in
cpmfetch_dao.php this:
function getMediaAddedSince ($timestamp) {
$retval = "";
if (is_numeric($timestamp)) {
$sqlcode = 'SELECT ' . $this->sqlSelect
. ', c.name AS cName, count( p.pid ) AS count '
. ' FROM '
. $this->sqlTableSelect
// . " WHERE p.aid = a.aid AND a.category = c.cid "
. " WHERE a.category = c.cid "
. $this->sqlUserDataLink
. " AND p.approved='YES' $this->privacyfilter AND p.ctime > " . $timestamp
. ' GROUP BY a.category, a.aid'
. ' ORDER BY c.name, p.mtime';
$retval = $this->dbExecuteSql($sqlcode);
}
return($this->covertResultsetToArray($retval));
}
into this:
function getMediaAddedSince ($timestamp) {
$retval = "";
if (is_numeric($timestamp)) {
$sqlcode = 'SELECT ' . $this->sqlSelect
. ', c.name AS cName, count( p.pid ) AS count '
. ' FROM '
. $this->sqlTableSelect
// . " WHERE p.aid = a.aid AND a.category = c.cid "
. " WHERE a.category = c.cid "
. $this->sqlUserDataLink
. " AND p.approved='YES' $this->privacyfilter AND p.ctime > " . $timestamp
. ' GROUP BY a.category, a.aid'
. ' ORDER BY p.ctime DESC';
$retval = $this->dbExecuteSql($sqlcode);
}
return($this->covertResultsetToArray($retval));
}
So it shows/lists the albums last updated/created and not by alphabetic order.
and then this is the code I used to show the list:
<?php
include "./photos/cpmfetch/cpmfetch.php";
$objCpm = new cpm("./photos/cpmfetch/cpmfetch_config.php");
$objCpm->cpm_setReturnType("resultset");
$data = $objCpm->cpm_showAlbumsUpdatedOverLastDays(100);
$cnt = 0;
$albumstoshow = 5;
$arrayofalbums = array();
foreach ($data as $row) {
if (! in_array($row['aTitle'],$arrayofalbums)) {
print "<table><tr>";
print "<td>";
print "<a href=\"/photos/displayimage.php?pos=-{$row['pPid']}\" target=\"_blank\"><img src=\"/photos/albums/{$row['pFilepath']}/thumb_{$row['pFilename']}\" width=\"40\"></A>";
print "</td>";
print "<td>";
print "<b>{$row['count']}</b> new pictures in<br><a href=\"/photos/thumbnails.php?album={$row['pAid']}\" target=\"_blank\">";
print $row['aTitle']. "</a><br>\n";
print "</td>";
print "</tr></table>";
array_push($arrayofalbums,$row['aTitle']);
$cnt++;
if ($cnt == $albumstoshow) break;
}
}
$objCpm->cpm_close();
?>
Maybe there's and easy way, or this is not completely right but it works for me, so yeah. You can see how it looks here:
http://canon-love.co.uk/ (on the left sidebar)