currently i have 16 pages of photos displayed in the "most viewed" area, is there a way to make it so it only displays say the 40 (1 page on my settings) most viewed files.
Find the relevent sql query and add LIMIT 40 to it. I can't advise specific code changes to 1.2 any longer.
unfortunatly i dont have the knowlegde to do this, can anybody else help?
You should upgrade to the latest version. Especially if you are going to modify your files, why work with outdated ones?
sorry i just checked and i do have 1.3.2 my mistake sorry, i thought i had installed 1.2 because the new version did not work with the shopping cart system i intended to use... mods could you please move this to the appropreate area?
Changes are in functions.inc.php, find:
$query ="SELECT COUNT(*) from {$CONFIG['TABLE_PICTURES']} WHERE approved = 'YES' AND hits > 0 $ALBUM_SET $keyword";
$result = db_query($query);
$nbEnr = mysql_fetch_array($result);
$count = $nbEnr[0];
change to
$count = 40;
and
$result = db_query("SELECT $select_columns FROM {$CONFIG['TABLE_PICTURES']} WHERE approved = 'YES'AND hits > 0 $ALBUM_SET $keyword ORDER BY hits DESC, filename $limit");
to
$result = db_query("SELECT $select_columns FROM {$CONFIG['TABLE_PICTURES']} WHERE approved = 'YES'AND hits > 0 $ALBUM_SET $keyword ORDER BY hits DESC, filename LIMIT 40");
That's for most viewed - it is almost the same for all meta albums.
will try that, thanks
EDIT: worked flawlessly, thank you very much