Thread: End-User Options - Time Spent On Board
View Single Post
  #17  
Old 03 Dec 2006, 18:09
MrPHD's Avatar
MrPHD MrPHD is offline
 
Join Date: Feb 2006
Real name: Helder Moreira
It seens you wrong edit the file, you can see ", 'lastvisit');

$this->userinfo['lastvisit'] = $this->userinfo['lastactivity'];
}
else
{

This is the line you tell an error, you can fix that unistall the hack and edit classcore.php again. Regards


Open includes/class_core.php, (1 change)

FIND:

// on this to be updated in real time.
$this->registry->db->shutdown_query("
UPDATE " . TABLE_PREFIX . "user
SET lastactivity = " . TIMENOW . "
WHERE userid = " . $this->userinfo['userid'] . "
", 'lastvisit');

REPLACE WITH:

// on this to be updated in real time.
/* $this->registry->db->shutdown_query("
UPDATE " . TABLE_PREFIX . "user
SET lastactivity = " . TIMENOW . "
WHERE userid = " . $this->userinfo['userid'] . "
", 'lastvisit');
*/

if(TIMENOW - $this->userinfo['lastactivity'] > $this->registry->options['cookietimeout'])
{
$newtime = '0';
}
else
{
$newtime = TIMENOW - $this->userinfo['lastactivity'];
}
$this->registry->db->shutdown_query("
UPDATE " . TABLE_PREFIX . "user
SET lastactivity = " . TIMENOW . ",
timeonboard = timeonboard + $newtime
WHERE userid = " . $this->userinfo['userid'] . "
", 'lastvisit');

if you donīt know use php well, i advice backup the original file allways, and you can backup renamed like class_core.phpold and put edited file and chmod 777.
__________________
InforPHotoviDeo ..:: SITESPHD.COM - WEB HOSTING Help Madeira Island DONATE
Reply With Quote