2013-08-19, 01:21 PM
Try replacing:
function websitecontrol($p)
{
global $mybb;
$gidlist = "0," . $mybb->settings['websitecontrol_exemptgroups'] . ",";
$groups = explode(",", $gidlist);
if ($mybb->settings['websitecontrol_onsetting'] == 1)
{
if (in_array($p['usergroup'],$groups) == true) {
//user is allowed
}
else {
if ($p['postnum'] >= $mybb->settings['websitecontrol_postcount'])
{
//user is allowed
}
else {
//user is not allowed
$p['button_www'] = '';
}
}
}
else {
//user is allowed, but plugin is disabled
}
}
with: function websitecontrol(&$post)
{
global $mybb;
$groups = explode(",", $mybb->settings['websitecontrol_exemptgroups']);
if ($mybb->settings['websitecontrol_onsetting'] == 1)
{
if (!in_array($post['usergroup'], $groups))
{
if ($post['postnum'] < $mybb->settings['websitecontrol_postcount'])
{
//user is not allowed
$post['button_www'] = '';
}
}
}
return $post;
}