MyBB Community Forums

Full Version: Plugin Problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Just making a simpleeeeeeee plugin here lol , but my "deactivate" function wont remove the template, any ideas? I just cant see the problem Confused

function userID_activate() {
   global $db;

   require MYBB_ROOT."/inc/adminfunctions_templates.php";
   
   find_replace_templatesets("postbit_author_user", "#".preg_quote('{$post[\'warninglevel\']}')."#i", '{$post[\'warninglevel\']}<br/>User ID: $post[uid]');

}

function userID_deactive() {
   global $db, $mybb;

   require MYBB_ROOT."/inc/adminfunctions_templates.php";
  
   find_replace_templatesets("postbit_author_user", "#".preg_quote('<br/>User ID: $post[uid]')."#i", '', 0);

}