The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
|||
|
|||
How do I convert my "hack" to a plugin / addon???
Ok, I have the need to hack my code so that I can regulate who uses the [ img ] tag. My code goes in the newreply.php. I still need to fully test it, and I know I still need to edit additional files to make my change complete. Just stating this, before anyone lets me know my hack doesn't work. Its not done.
Anyways.....here is what I have done.... I have inserted the following code at about line 301 Code:
// If user primary group is not 6,7 or 17....remove the img tags $tmp = $vbulletin->db->query_first(" SELECT count(1) as num FROM " . TABLE_PREFIX . "user AS user WHERE user.userid = " . $vbulletin->userinfo['userid'] . " AND user.usergroupid in (6,7,17) "); if (0 == $tmp['num']) { //we need to remove the [img] tags.... $newpost['message'] = str_ireplace("[img]","",$newpost['message']); $newpost['message'] = str_ireplace("[/img]","",$newpost['message']); } I tried looking at some examples, but most of those where template changes. Thanks for your help, Dr00pY |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|