Quote:
Originally Posted by Dan
Hmm..... you shouldn't get an error.... I'll look into this and check it out.
|
Hi Dan, I downloaded this today and noticed a few things in it you missed. This will fix the error with the ' throwing errors:
in newthread.php find:
PHP Code:
$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,attachmentid,pagetext,allowsmilie,showsignature,ipaddress,iconid,visible,nowp) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($title))."','".addslashes($postusername)."','$bbuserinfo[userid]','".time()."','$attachmentid','".addslashes($message)."','$allowsmilie','$signature','$ipaddress','$iconid','$visible', '$nowp')");
Replace it with:
PHP Code:
$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,attachmentid,pagetext,allowsmilie,showsignature,ipaddress,iconid,visible,nowp) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($title))."','".addslashes($postusername)."','$bbuserinfo[userid]','".time()."','$attachmentid','".addslashes($message)."','$allowsmilie','$signature','$ipaddress','$iconid','$visible', '".addslashes(htmlspecialchars($nowp))."')");
In newreply.php find:
PHP Code:
$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,attachmentid,pagetext,allowsmilie,showsignature,ipaddress,iconid,visible,nowp) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($title))."','".addslashes($postusername)."','$bbuserinfo[userid]','".time()."','$attachmentid','".addslashes($message)."','$allowsmilie','$signature','$ipaddress','$iconid','$visible', '$nowp')");
Replace with:
PHP Code:
$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,attachmentid,pagetext,allowsmilie,showsignature,ipaddress,iconid,visible,nowp) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($title))."','".addslashes($postusername)."','$bbuserinfo[userid]','".time()."','$attachmentid','".addslashes($message)."','$allowsmilie','$signature','$ipaddress','$iconid','$visible', '".addslashes(htmlspecialchars($nowp))."')");
And this will hide 'now playing' in the postbit when it is not in use:
in functions.php find:
PHP Code:
if ($post[homepage]!="" and $post[homepage]!="http://") {
eval("\$post[homepage] = \"".gettemplate("postbit_homepage")."\";");
} else {
$post[homepage]="";
}
Under It add:
PHP Code:
if ($post['NOWP'] != '')
{
eval("\$nowplayi_ng = \"".gettemplate("postbit_nowplaying")."\";");
}
else
{
$nowplayi_ng = '';
}
Make a new template call postbit_nowplaying and populate it with:
PHP Code:
Now Playing: $post[NOWP]
Open the postbit template find:
PHP Code:
Now Playing: $post[NOWP]
Replace with:
Last but not least in showthread.php do the fallowing to avoid un-cached templates throwing extra querys:
Find:
PHP Code:
,postbit_buddy,postbit_useremail
Replace with:
PHP Code:
,postbit_buddy,postbit_useremail,postbit_nowplaying,
Find:
PHP Code:
,postbit_search,postbit_buddy,
Replace with:
PHP Code:
,postbit_search,postbit_buddy,postbit_nowplaying,
All done, keep up the good work Dan