Oh ok, sorry, thry this code:
Code:
if( $this->user['ppd_require'] )
{
$posts_today_time = mktime(0,0,0,date("m"),date("d"),date("Y"));
$postcounter=0;
// get todays posts that are in forums where postcounting is active
$countquery = $DB->query("SELECT p.userid, f.options
FROM ibf_post AS p, ibf_thread AS t, ibf_forum AS f
WHERE p.dateline>".$posts_today_time."
AND p.userid=".$this->user['id']."
AND p.threadid=t.threadid
AND t.forumid=f.forumid");
while ($counter=$DB->fetch_row($countquery))
{
if (substr($counter['options'],4,1)=="1") { $postcounter++; }
}
$this->user['posts_today'] = $postcounter;
}