Not Solved Homepage control plugin HELP
#2
Not Solved
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;
    }
Reply


Messages In This Thread
Homepage control plugin HELP - by marcus123 - 2013-08-19, 12:13 PM
RE: Homepage control plugin HELP - by Destroy666 - 2013-08-19, 01:21 PM
RE: Homepage control plugin HELP - by marcus123 - 2013-08-19, 01:28 PM
RE: Homepage control plugin HELP - by meoip - 2013-12-15, 06:01 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)