Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Force Style for Selected Users or Groups Details »»
Force Style for Selected Users or Groups
Version: 3.8.001, by Mosh Mosh is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 3.8.x Rating:
Released: 11-20-2008 Last Update: Never Installs: 99
DB Changes Uses Plugins
Re-useable Code Translations  
No support by the author.

Please click Mark as Installed if you are using this hack.


What Does This Hack Do?[hr]hr[/hr]
It is a update of my v3.7.x hack available here, 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 Style in the vBulletin 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).


Frequently Asked Questions

Question:
What if you need custom style permissions as well?
Answer:
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 I 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.

But just to let you know that Andreas's hack is unsupported and is not likely to ever be supported (unless it is a proven bug), so if you have problems with it, you are on your own.

vBulletin Version Compatibility[hr]hr[/hr]
This hack can be used with vBulletin versions 3.6.0 - 3.8.8.

For an unsupported v3.5.x version of this hack - check here.

For an unsupported v4.0.x version of this hack - check here.



Hack Support/Feature Requests[hr]hr[/hr]
IMPORTANT: This hack is no longer supported.


Install Instructions[hr]hr[/hr]
  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.

Uninstall Instructions[hr]hr[/hr]
  1. Delete the bitfield_ms_force_style.xml file from your /includes/xml folder.
  2. Uninstall the product in vB using the AdminCP Product Manager.

Version History[hr]hr[/hr]
v3.8.001 - Friday 21st November 2008
-- Initial Release


Thanks[hr]hr[/hr]
Thanks go out to Paul M who gave me permission to use some of his install code.


Show Your Appreciation [hr]hr[/hr]
Although not required, if you have enjoyed the benefits of this hack, and would like show your appreciation for my efforts, then please feel free to click on the Support Developer link and donate any amount you feel is appropriate.

Download Now

File Type: zip ms_force_style_38.zip (2.9 KB, 567 views)

Screenshots

File Type: png screenshot1.png (44.7 KB, 0 views)
File Type: png screenshot2.png (18.3 KB, 0 views)
File Type: png screenshot3.png (16.2 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 11-21-2008, 05:34 PM
Fungsten's Avatar
Fungsten Fungsten is offline
 
Join Date: Jul 2006
Posts: 1,131
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Reserved.
Reply With Quote
  #3  
Old 11-23-2008, 07:24 PM
crkgb crkgb is offline
 
Join Date: Oct 2007
Posts: 237
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

After reading the "hack support" portion I am scared to use this hack.
Reply With Quote
  #4  
Old 11-24-2008, 03:31 AM
Q-v-n-s-Q Q-v-n-s-Q is offline
 
Join Date: Mar 2005
Posts: 289
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

just upgrade myboard, gona try it out, thanks
Reply With Quote
  #5  
Old 12-28-2008, 08:34 AM
ziggylol ziggylol is offline
 
Join Date: Sep 2008
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you this hack, it is perfect for my site!
Reply With Quote
  #6  
Old 01-14-2009, 03:05 PM
twistedsymphony twistedsymphony is offline
 
Join Date: Nov 2008
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just installed this on 3.7.4 it doesn't seem to be working. enabled it in the main option page, then went into the usergroups where I wanted to force a style and enabled it there and set the style...

one of the usergroups where I forced a style was the generic "not logged in/Guest" group but when I log out of my account, even after clearing my cache and restarting the browser as a guest I can still change the style by the drop down and when I select the different style the page changes.

your installation instructions were quite simple I find it hard to believe I messed something up.

Any help would be appreciated.

EDIT: Nevermind, my mistake... it IS forcing a style even though it allows you to chose a differet style...
Reply With Quote
  #7  
Old 01-14-2009, 03:55 PM
Fungsten's Avatar
Fungsten Fungsten is offline
 
Join Date: Jul 2006
Posts: 1,131
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Where do you set the Usergroups? TIA.
Reply With Quote
  #8  
Old 01-14-2009, 07:43 PM
Mosh's Avatar
Mosh Mosh is offline
 
Join Date: Aug 2004
Location: Melbourne, Australia
Posts: 1,968
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by twistedsymphony View Post
I just installed this on 3.7.4 it doesn't seem to be working. enabled it in the main option page, then went into the usergroups where I wanted to force a style and enabled it there and set the style...

one of the usergroups where I forced a style was the generic "not logged in/Guest" group but when I log out of my account, even after clearing my cache and restarting the browser as a guest I can still change the style by the drop down and when I select the different style the page changes.

your installation instructions were quite simple I find it hard to believe I messed something up.

Any help would be appreciated.

EDIT: Nevermind, my mistake... it IS forcing a style even though it allows you to chose a differet style...
This should help you (already in the first post):
Quote:
Originally Posted by 1st Post
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 I 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.

But just to let you know that Andreas's hack is unsupported and is not likely to ever be supported (unless it is a proven bug), so if you have problems with it, you are on your own.
Reply With Quote
  #9  
Old 01-14-2009, 07:45 PM
Mosh's Avatar
Mosh Mosh is offline
 
Join Date: Aug 2004
Location: Melbourne, Australia
Posts: 1,968
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Fungsten View Post
Where do you set the Usergroups? TIA.
Do step #5 (already in first post):
Quote:
Originally Posted by 1st Post
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.
Reply With Quote
  #10  
Old 01-14-2009, 08:06 PM
Fungsten's Avatar
Fungsten Fungsten is offline
 
Join Date: Jul 2006
Posts: 1,131
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Mosh View Post
Do step #5 (already in first post):
I re-uploaded the bitfile. For some reason it got deleted. Thanks!!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:08 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04870 seconds
  • Memory Usage 2,339KB
  • Queries Executed 24 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (4)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete