Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 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: 1.01, by Mosh Mosh is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 3.6.x Rating:
Released: 04-01-2007 Last Update: 04-10-2007 Installs: 67
Uses Plugins
Re-useable Code Translations  
No support by the author.

Hack Support

This hack is now discontinued - this means that while it will remain available for download and use, there will be no further updates, nor will support be provided as the thread is no longer monitored. But not to worry, you can now check out the new 3.8.x version of this hack which will work with v3.7.x, as well as with v3.6.12 (and maybe even earlier versions).

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


vBulletin Version Compatibility

This hack can be used with both vBulletin v3.6.x and v3.7.x


What Does This Hack Do?

This hack allows you to force a style to certain usergroup(s), secondary usergroup(s), and/or certain user(s) or any combination of the three. It is a port/update of my v3.5.x hack available here, apart from the fact that settings are now controlled from the AdminCP.

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 template at all, but as soon as you logged out you were presented with the default template that you did not want guests to see.

This hack rectifies that. It also allows you to let others use the Default Style while forcing the usergroup(s)/member(s) to the one style you selected.

Note: There is no upgrade path from my v3.5.x version, you have to uninstall that one first before installing this one.


Installation Instructions
  1. Import the product-jd_20070403.xml into vB using the AdminCP Product Manager. If upgrading from an earlier version, then set Allow Overwrite to Yes.
  2. 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.
  3. In the other boxes, select the usergroup(s), member(s) and the style id you want to force on those usergroups or members

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 and v3.7.x, and it works for three 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.


Version History

v1.01 - Wednesday 11th April 2007
-- Final Release
-- Added: AdminCP option

v1.00 - Tuesday 3rd April 2007
-- Initial Release


Show Your Appreciation

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.

Show Your Support

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

Comments
  #32  
Old 03-30-2008, 07:47 AM
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 Ronin Six View Post
Thanks for this mod!! Been using it a little while now.

Just having some issues with guest users seeing a custom style even though I'm not forcing it on them. Here's the situation:

Parent style is the default style. Custom style is a child of the default.
I'm forcing the custom child style on user groups that have been promoted to a certain level.

I'm not forcing the custom child style on the guests, but they're seeing it anyway.

I have a feeling it might be because I'm using it slightly different that you have it for your own forums (your default is a child style, and what you're forcing is the parent). Any help would be appreciated. Thanks!
I think it may be a problem with style permissions, either a style is selectable or it is not, there are no usergroup permissions for styles by default, well, not without a hack.

The solution for you may be:

Quote:
Originally Posted by Instructions
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 both v3.5.x, v3.6.x and v3.7.x, and it works for both and works fine with my hacks for both versions as well.

For instance on my own forum I need to use both hacks, as the style I force on my guests and normal members is not selectable or 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, so if you have problems with it, you are on your own.
Reply With Quote
  #33  
Old 04-01-2008, 07:02 AM
stamos2003 stamos2003 is offline
 
Join Date: Nov 2003
Location: Berlin
Posts: 107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

very good hack, this should be integrated in to VB anyway!
Reply With Quote
  #34  
Old 05-01-2008, 07:27 AM
reverse1312 reverse1312 is offline
 
Join Date: Jan 2006
Location: Europa
Posts: 53
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello,

I'm with vB 3.6.5
I created a special new style to test it.
in my options styles are not selectable
tried to force a special new secondary group to use this style. Did not work
tried to force a special news main usergroup to use it. Did not work
tried to force 1 user . It succeded. :-)
2 users too but with a third one it did not work...

How is it possible ?
Reply With Quote
  #35  
Old 05-02-2008, 01:30 AM
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 reverse1312 View Post
Hello,

I'm with vB 3.6.5
I created a special new style to test it.
in my options styles are not selectable
tried to force a special new secondary group to use this style. Did not work
tried to force a special news main usergroup to use it. Did not work
tried to force 1 user . It succeded. :-)
2 users too but with a third one it did not work...

How is it possible ?
Refer to the solution in post #31, it may well solve you issue.

Let me know if it does not.
Reply With Quote
  #36  
Old 05-03-2008, 09:28 AM
reverse1312 reverse1312 is offline
 
Join Date: Jan 2006
Location: Europa
Posts: 53
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Let me know if it does not.
You're right, I had to install the other hack ;-)
Thank you very much !
Reply With Quote
  #37  
Old 05-03-2008, 11:32 AM
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 reverse1312 View Post
You're right, I had to install the other hack ;-)
Thank you very much !
You are most welcome
Reply With Quote
  #38  
Old 06-04-2008, 08:38 AM
madkeen madkeen is offline
 
Join Date: Jan 2007
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks
Reply With Quote
  #39  
Old 09-03-2008, 04:22 AM
Mosh's Avatar
Mosh Mosh is offline
 
Join Date: Aug 2004
Location: Melbourne, Australia
Posts: 1,968
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

NOTE: This hack is now discontinued - this means that while it will remain available for download and use, there will be no further updates, nor will support be provided as the thread is no longer monitored. But not to worry, you can now check out the new 3.7.x version of this hack, as it also works with v3.6.10 (and maybe even earlier versions).
Reply With Quote
  #40  
Old 09-12-2008, 09:15 AM
TheMusicMan's Avatar
TheMusicMan TheMusicMan is offline
 
Join Date: Oct 2002
Location: South Wales
Posts: 202
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi All

How would I make this mod work as I want it to thus;

I want to force a Style on a usergroup, but I don't want anyone else to be able to see or select this style unless it is forced on them...?

Sounds unusual - but I have several members who don't want to see the ads AND who want the default vB style (as this is easy on their eyes). I dont want to have to create a derivative/child of my single style for them, so to allow them visibility of the default style containing no ads is the solution. They will have paid to support the site thus entitleing them not to see ads.

Can I configure this hack (with template conditionals I guess) to work for these requirements...?
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 12:30 AM.


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.18067 seconds
  • Memory Usage 2,309KB
  • Queries Executed 26 (?)
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
  • (6)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
  • (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_postinfo_query
  • fetch_postinfo
  • 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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete