Force Style for Selected Users or Groups

MobileHacks

New Member
vBulletin Version Compatibility

This hack can be used with v3.8 Beta 3, v3.7.4 and v3.6.12. This has not been tested with earlier versions of v3.7.x and v3.6.x, but should work.

What Does This Hack Do?

It is a update of v3.7.x hack available with new functionality added.

This hack allows you to force a style to a usergroup via usergroup permissions, so this means that you can force different usergroups to different styles (previous versions of this hack only allowed you to apply only 1 style to a set of usergroups/users).

You can also force a single style (centrally via vBulletin Options) to 1 or more users, and this will override any style that has been forced on usergroups that the user(s) are in.

Scenario

The setup on my forums is that I use the default style as the parent to all my other styles which makes modifying the templates easy for me, I just edit my default style and the child styles inherit the changes.

I wanted to use a child style as the standard style for visitors and members, but not have them have a choice of the default style at all, but as soon as you logged out you were presented with the default style that you did not want guests to see.

This hack rectifies that. It also allows you to let others use the forum wide default style (selected via Style & Language Settings -> Default StylevBulletin Options of the AdminCP) while forcing the usergroup(s)/member(s) to the one style you selected, except in cases where you have specifically assigned a custom style to a forum in Forum Manager and override the users' style choice for that forum (it will use the custom style assigned to that forum, unless you select to override that too).

in the Installation Instructions
  1. Unzip ms_force_style_38.zip
  2. Upload bitfield_ms_force_style.xml to your /includes/xml folder.
  3. Import the ms_force_style_38.xml into vB using the AdminCP Product Manager. If upgrading from an earlier version, then set Allow Overwrite to Yes.
  4. In vBulletin Options > Force Styles for Selected Users or Groups, change Force Styles for Selected Users or Groups - Enable to Yes to turn it on. You can also enter user(s) to force a style on (and the style to force on them).
  5. In the Usergroup Manager edit the usergroup(s) you want to force a style on.

What if you need custom style permissions as well?

This question has been asked a few times: What if you need custom style permissions so that you can control which usergroups see/select what styles? The hack use is Andreas's Restrict Style to Usergroup hack which he released for v3.5.x. It is because of that hack that this one exists, and I have tested it on v3.5.x, v3.6.x, v3.7.x and v3.8.x, and it works for all four versions and works fine with my hacks as well.

For instance on my forum I need to use both hacks, as the style I force on my guests and normal members is not selectable nor do I allow them permission to use it, and is also not my default style (all my other styles are child styles of my default one), so without Andreas's hack I would not be able to do this.

Version History

v3.8.001 - Friday 21st November 2008
-- Initial v3.8.x release
 
Top