May 25, 2008, 04:01 AM
MyBB Version: MyBB 1.2.*
New Settings: 3 [ BadwordFilter Settings ]
New Templates: 1 [ usercp_bwfub ]
DB Changes: 1 [ new column in users table ]
File Changes: 2
Files: 1
Install:
* You can decide where badwords in posts gets filtered and for who ( based on their usergroup ). Or you can the user himself choose whether they want to see badwords or not; but you have to change the setting in your ACP to let them choose else they wont see the option in their UCP - Edit Options.
Tested On: MyBB 1.2.13
Update:14/06/08 [[ If the overwrite setting doesn't work properly; redo the filechanges; they're changed a lil' ]]
New Settings: 3 [ BadwordFilter Settings ]
New Templates: 1 [ usercp_bwfub ]
DB Changes: 1 [ new column in users table ]
File Changes: 2
Files: 1
- ./inc/plugins/bwfub.php
Install:
- Upload ./inc/plugins/bwfub.php into your ./inc/plugins/ folder
- Go to your PluginManager and Activate the "BadwordFilter" Plugin.
- File Change: open ./inc/functions_post.php
Find
Add BelowPHP Code:
if($post['smilieoff'] == "yes")
{
$parser_options['allow_smilies'] = "no";
}
PHP Code:
// GROUPS
$groups = explode(",", $mybb->settings['bwfub_groups']);
// FIDS
$fids = explode(",", $mybb->settings['bwfub_fids']);
// CHECK
$filter = true;
// CONTROL
if($mybb->settings['bwfub_over'] == "yes")
{
if($mybb->user['filterbadwords'] == "no")
{
$filter = false;
}
}
else if((in_array($fid, $fids) && $fids) || (in_array($mybb->user['usergroup'], $groups) && $groups))
{
$filter = false;
}
if(!$filter)
{
$parser_options['filter_badwords'] = "no";
} - File Change: open xmlhttp.php
Find
Add AbovePHP Code:
$post['message'] = $parser->parse_message($message, $parser_options);
PHP Code:
// GROUPS
$groups = explode(",", $mybb->settings['bwfub_groups']);
// FIDS
$fids = explode(",", $mybb->settings['bwfub_fids']);
// CHECK
$filter = true;
// CONTROL
if($mybb->settings['bwfub_over'] == "yes")
{
if($mybb->user['filterbadwords'] == "no")
{
$filter = false;
}
}
else if((in_array($post['fid'], $fids) && $fids) || (in_array($mybb->user['usergroup'], $groups) && $groups))
{
$filter = false;
}
if(!$filter)
{
$parser_options['filter_badwords'] = "no";
}
- Usergroups
> Disable BadwordFilter For What Groups? - ForumSections
> Disable BadwordFilter For What ForumSections? - Allow Users To Choose The BadwordFilter Option In Their UCP?
> Overrides the 2 settings above.
* You can decide where badwords in posts gets filtered and for who ( based on their usergroup ). Or you can the user himself choose whether they want to see badwords or not; but you have to change the setting in your ACP to let them choose else they wont see the option in their UCP - Edit Options.
Tested On: MyBB 1.2.13
Update:14/06/08 [[ If the overwrite setting doesn't work properly; redo the filechanges; they're changed a lil' ]]
