Is it possible to reduce the number of most viewed files to lets say the top 100.
Now all my files are in de most viewed list (1000 pictures), but i only want to see the top 100.
Yes, I have the same question.
In addition: is it possible to reduce also the pictures in "last uploads"?
out-of-the-box: no and no. Why does it bother you? They're both meta-albums, no space is wasted, it's just a query...
If you really need it removed you'll have to modify the queries accordingly (I won't look into this because I don't see any sense in this request).
GauGau
You probally could do it using the "TOP" query function in sql..
i'm sure it would work..
but then again i agree on it doesnt matter if theres a top 100, 1000 or all pictures..
You might also look into adding a LIMIT restriction to the SQL query.
I would like to know what query this is, because it does eat a lot of bandwith when somebody chooses the Most Viewed option and there are several thousand thumbnails that have to be shown.
To reduce the number of pics shown in the last upoads on the front page, just remove the ',2' after 'lastup' in the contents of main page, in config.
The query can be found in /include/functions.inc.php
Find:
case 'topn': // Most viewed pictures
If u don't want to alter the query to limit the number of most viewed pics to only one page of thumbs according with your max tabs configuration find
case 'topn': // Most viewed pictures
if ($ALBUM_SET && $CURRENT_CAT_NAME) {
$album_name = $lang_meta_album_names['topn'].' - '. $CURRENT_CAT_NAME;
} else {
$album_name = $lang_meta_album_names['topn'];
}
$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];
and after add
if ($count > $CONFIG['max_tabs']){
$count = $CONFIG['max_tabs'];
}
If you want x pages of most viewed pics set a variable and use it in the code
Ex.: For 3 pages of thumbs
$numofpages = (3 * $CONFIG['max_tabs'])
and so the code to add:
if ($count > $numofpages){
$count = $numofpages;
}