Disable New Users From Selecting Style

Brent W

Well-known member
I simply want to keep new users from selecting a style but allow previous people who already have that style selected to continue to use it. Currently, if I disable the style from selection it appears to kick everyone to the default style. Anyway around this without an add-on I am missing?
 
This may be a good starting point:

https://xenforo.com/community/resources/different-style-per-domain-code-example.394/

You might use a condition like this:

Code:
		// old users (based on user_id)
		if ($visitor['user_id'] < 2000)
		{
			// do nothing
		}
		// new users
		else
		{
			// if using the restricted style
			if ($visitor['style_id'] == 3)
			{
				// set it back to default
				$visitor['style_id'] = 1;
			}
		}

The restricted style will still show up as selectable for everyone, but this code will ensure the selection doesn't work for new users.
 
This may be a good starting point:

https://xenforo.com/community/resources/different-style-per-domain-code-example.394/

You might use a condition like this:

Code:
        // old users (based on user_id)
        if ($visitor['user_id'] < 2000)
        {
            // do nothing
        }
        // new users
        else
        {
            // if using the restricted style
            if ($visitor['style_id'] == 3)
            {
                // set it back to default
                $visitor['style_id'] = 1;
            }
        }

The restricted style will still show up as selectable for everyone, but this code will ensure the selection doesn't work for new users.

Thanks I will give this a look.
 
Top Bottom