Hi!
In order to not handicap new picts I would like to order most popular picts following the number of click per day instead of the total number of click... Is that mod already existing? Or anybody can help me?
Thanx,
up... :P
Not posted afaik, you'd need to add in per day hit tracking to do this.
Here's what I tried, without succes:
I found: $query = "SELECT $select_columns FROM {$CONFIG['TABLE_PICTURES']} WHERE approved = 'YES'AND hits > 0 $META_ALBUM_SET $keyword ORDER BY hits DESC, filename $limit";
and replace by: $now = time();
$query = "SELECT $select_columns FROM {$CONFIG['TABLE_PICTURES']} WHERE approved = 'YES'AND hits > 0 $META_ALBUM_SET $keyword ORDER BY hits/($now-ctime) DESC, filename $limit";
But all I got is the pict ordered by date...
Then I tried ORDER BY (hits/($now-ctime))
and
ORDER BY (hits*1/($now-ctime*1))
and
ORDER BY (hits*1/($now*1-ctime*1))
and finally
ORDER BY (hits*1/(".$now."-ctime*1))
with always the same result. I wonder if $now = time();
is correct.
Any idea???
OK, if someone cares about that, I found why it didn't work. The result was in click per second, and of course < to 0,01, so understood as 0,00. The solution is to multiply the result by 86400 to have the number of click per day...