I've noticed a small problem with this hack and am having trouble fixing it.
In the forumdisplay.php file, the code in question is below:
PHP Code:
$reponses = $DB_site->query_first("SELECT COUNT(" . TABLE_PREFIX . "post.postid) AS rep_week FROM " . TABLE_PREFIX . "post, " . TABLE_PREFIX . "thread WHERE " . TABLE_PREFIX . "post.dateline>$temps_restant AND thread.forumid=$forumid AND " . TABLE_PREFIX . "post.threadid=" . TABLE_PREFIX . "thread.threadid AND " . TABLE_PREFIX . "post.username='$bbuserinfo[username]'");
The problem lies with the very end of the statement
PHP Code:
"post.username='$bbuserinfo[username]'");
Everything normally works great, until you have a user that has an ' in their username. For example: Bob'sAutoShop
PHP is gonna throw out an error because the string Bob'sAutoShop is going to end as soon as it see's the ' mark.
How do I need to format the code (the " and the ' marks) in order for this to work correctly? I want to keep my fix inside this line of code if at all possible, so I don't have to change much of the default vBulletin code.
Can you help me here? I'd GREATLY appreciate it if you could. Thanks!