2
Hmmm yes possibly possible (interesting sentence really
![](https://xoops.org/uploads/smil42e7a42768aef.gif)
)
If you record the clicks as update and with a timestamp.
$sql = "UPDATE ".$xoopsDB->prefix('table_name')." SET click = click + 1 AND time = NOW() WHERE ID = $id"'";
$result = $xoopsDB->queryF($sql);
Then make a function something like this..
function XX_HalfClicks () {
global $xoopsDB;
$sql = "UPDATE * FROM ".$xoopsDB->prefix('mytable')." WHERE time = DATE_SUB(NOW(),INTERVAL -1 week) SET click = click/2";
$result=$xoopsDB->queryF($sql);
}
Something like this. The function could forinstance be in the header or something like this (just check the code though, It was simply as an example, I havenet checked if it work or anything :)