I got a problem that if the nickname has ' sign or \ sign post the new post, the statistic won't work. I used firebug, a addon of firefox and found out the code went wrong at
PHP Code:
Invalid SQL:
SELECT userid,usergroupid,displaygroupid FROM user WHERE username = 'p3'hi3u'' LIMIT 1;
MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL
server version for the right syntax to use near 'hi3u'' LIMIT 1' at line 1
so I try to fix it.
Go to plugin Chang - Advanced Top - Get Data
find
PHP Code:
$qinfo = $db->query_first("SELECT userid,usergroupid,displaygroupid FROM ". TABLE_PREFIX ."user WHERE username = '$clastposter' LIMIT 1");
replace by
PHP Code:
$qinfo = $db->query_first("SELECT userid,usergroupid,displaygroupid FROM ". TABLE_PREFIX ."user WHERE username = '".addslashes($clastposter)."' LIMIT 1");
find
PHP Code:
$clastposter = htmlspecialchars($clastposter);
replace by
PHP Code:
// $clastposter = htmlspecialchars($clastposter);