i want to make a toplist using the 'hitsintemp' field where my traders hits-in wont reset. i want to do that by copying the 'hitsintemp' to a new field 'previoushitsin' just before 'hitsintemp' field resets. Then i will list them according to 'importortance'='hitsintemp' + 'previoushitsin' so at all times the toplist will use the last 24-48hours hits-in (for 1 day 'hitsintemp' range).
i tried to change in timedactions.php -------------------------------------------------------------------------------- if ( (time() - ($settings->hitstempdays * 86400)) > $settings->hitstempreset) { // reset temporary hits counters
Comments on hits-in toplist without reset
Experienced
Usergroup: Customer
Joined: Feb 22, 2004
Total Topics: 47
Total Comments: 88
Hello Paul,
i want to make a toplist using the 'hitsintemp' field where my traders hits-in wont reset.
i want to do that by copying the 'hitsintemp' to a new field 'previoushitsin' just
before 'hitsintemp' field resets.
Then i will list them according to
'importortance'='hitsintemp' + 'previoushitsin'
so at all times the toplist will use the last 24-48hours hits-in (for 1 day 'hitsintemp' range).
i tried to change in timedactions.php
--------------------------------------------------------------------------------
if ( (time() - ($settings->hitstempdays * 86400)) > $settings->hitstempreset)
{
// reset temporary hits counters
//-------------------my code
$db->update('linkstable', 'previoushitsin', 'hitsintemp', 'id>0');
//-------------------
$db->update('linkstable', 'hitsouttemp', '0', 'id>0');
$db->update('linkstable', 'hitsintemp', '0', 'id>0');
$settings->hitstempreset = time();
$settings->update('hitstempreset');
}
---------------------------------------------------------------------------------
but it's not working, any idea how i could do this?
thanks
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
hitsintemp is probably being considered a string. Try $db->query("UPDATE wsnlinks_links SET previoushitsin = hitsintemp");
Experienced
Usergroup: Customer
Joined: Feb 22, 2004
Total Topics: 47
Total Comments: 88
it works, thanks Paul