2011-07-23, 06:26 PM
I'm working on a plugin to report spammers and I want to add a link to it from the Moderator Options section in the user profile.
I have this code in _activate:
The second template (modcp_editprofile) gets modified. The member_profile_modoptions template isn't modified, even though there are a lot of b's in it.
Is this template read-only or what?[/php]
I have this code in _activate:
// Make the plugin "visible" by adding and changing templates
function report_spammer_activate()
{
require_once MYBB_ROOT . 'inc/adminfunctions_templates.php';
find_replace_templatesets('member_profile_modoptions', '#b#i', 'not working', 0); // WTF
find_replace_templatesets('modcp_editprofile', '#({\$lang->moderation}.*?</tr>\s*</table>\s*</fieldset>)#si', '$1' . "\n" . '{$report_spammer}', 1); // works
}
The second template (modcp_editprofile) gets modified. The member_profile_modoptions template isn't modified, even though there are a lot of b's in it.
Is this template read-only or what?[/php]