Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Add-ons

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
  #12  
Old 01-26-2009, 01:55 PM
tony adams tony adams is offline
 
Join Date: Oct 2004
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

installed - many thanks
Reply With Quote
  #13  
Old 02-10-2009, 09:07 AM
craig5320 craig5320 is offline
 
Join Date: Aug 2004
Location: Manchester, UK
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,

It works great, but I have a forced style on one of my vBAdvanced pages and it overrides this as well. I see the option not to override custom forum styles but this has no effect on the vBa page, would there be an easy solution?

Thanks

EDIT: I altered the plugin to execute at 4 instead of 5, allowing the vBa code to execute after and it seems to be working
Reply With Quote
  #14  
Old 02-14-2009, 02:07 AM
smirkley smirkley is offline
 
Join Date: Apr 2008
Posts: 627
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Question,...I have two styles,...

1 - one for guests and members,..and one I force on all staff levels.

Works for the admin levels,...but even though set for mods and smods also, the mods and smods still only see the guest/member style.

I dont have it set where a user can select a style.

Hopefully it is just a setting, maybe I need a pointer?
Reply With Quote
  #15  
Old 02-15-2009, 02:22 PM
smirkley smirkley is offline
 
Join Date: Apr 2008
Posts: 627
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK, after much troubleshooting and reinstall to get this running as I described, I have come to the conclusion that I cannot get it to operate properly and there may be a bug.

I am running vB3.8.1 and using the install on this page for the hack. (I did have the old one installed but overwrote everything for this install)

Anyways, I have the admin group set to the child style, as well as the mods and smods.

The mods and smods still revert to the parent style though, and I have found that I cannot select and enter an individual mod or smod userid to force the child style onto also.

So basically, any mod or smod cannot be forced onto, either by usergroup, nor userid.

As a note, the only difference to my parent/child styles, is I have google adsense in the vb advert templates for guest and member view, otherwise they are identical.

Some assistance is greatly appreciated as this modification is one of my fav's.

thanks in advance
Reply With Quote
  #16  
Old 02-15-2009, 08:53 PM
smirkley smirkley is offline
 
Join Date: Apr 2008
Posts: 627
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ummmm,....

Ok,....nvmnd.

(problem was on my end, forgot I was an admin and I didnt have the child skin enabled.)

Egads.

(tnx again)
Reply With Quote
  #17  
Old 03-10-2009, 12:32 AM
newguy's Avatar
newguy newguy is offline
 
Join Date: Nov 2007
Location: USA
Posts: 185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I installed this mod, and when I un-installed it I now get this error when I make changes to a user group and try to save it.

PHP Code:
Database error in vBulletin 3.8.1:

Invalid SQL:
UPDATE usergroup SET

### UPDATE QUERY GENERATED BY fetch_query_sql() ###
`title` = 'No PM & Posts Are Moderated',
`
description` = '',
`
usertitle` = '',
`
opentag` = '',
`
closetag` = '',
`
passwordexpires` = '0',
`
passwordhistory` = '0',
`
ispublicgroup` = '0',
`
canoverride` = '0',
`
vbblog_general_permissions` = '254328',
`
vbblog_customblocks` = '0',
`
vbblog_custompages` = '0',
`
vbblog_entry_permissions` = '7920',
`
vbblog_comment_permissions` = '896',
`
forumpermissions` = '12390911',
`
genericpermissions` = '1243616707',
`
attachlimit` = '0',
`
pmquota` = '0',
`
pmpermissions` = '0',
`
pmsendmax` = '5',
`
pmthrottlequantity` = '0',
`
calendarpermissions` = '32',
`
wolpermissions` = '0',
`
adminpermissions` = '0',
`
genericpermissions2` = '0',
`
genericoptions` = '62',
`
profilepicmaxwidth` = '100',
`
profilepicmaxheight` = '100',
`
profilepicmaxsize` = '404800',
`
avatarmaxwidth` = '120',
`
avatarmaxheight` = '120',
`
avatarmaxsize` = '404800',
`
signaturepermissions` = '234111',
`
sigpicmaxwidth` = '450',
`
sigpicmaxheight` = '100',
`
sigpicmaxsize` = '404800',
`
sigmaxrawchars` = '1000',
`
sigmaxchars` = '500',
`
sigmaxlines` = '0',
`
sigmaxsizebbcode` = '7',
`
sigmaximages` = '4',
`
albumpermissions` = '254',
`
albumpicmaxwidth` = '600',
`
albumpicmaxheight` = '600',
`
albumpicmaxsize` = '100000',
`
albummaxpics` = '20',
`
albummaxsize` = '0',
`
usercsspermissions` = '63',
`
visitormessagepermissions` = '60',
`
socialgrouppermissions` = '51060',
`
maximumsocialgroups` = '5',
`
groupiconmaxsize` = '404800',
`
trgpermissions` = '5',
`
ms_force_style_permissions` = '0',
`
force_style_id` = ''
WHERE usergroupid=11;

MySQL Error   Unknown column 'ms_force_style_permissions' in 'field list'
Error Number  1054
Request Date  
MondayMarch 9th 2009 09:22:09 PM
Error Date    
MondayMarch 9th 2009 09:22:09 PM
Script        
http://mysite.com/forums/admincp/usergroup.php?do=update
Referrer      http://mysite.com/forums/admincp/usergroup.php?do=edit&usergroupid=11
IP Address    xx.xxx.xx.xxx my IP
Username      
my user name
Classname     
vB_Database
MySQL Version 
5.0.67-community 


At the bottom of each user group pahe in the user group manager there is still the place where you could edit the settings. No text there at all. Just the bullets to select yes or no.

Any one help? I have used the two previous versions for a long time.
Reply With Quote
  #18  
Old 03-10-2009, 05:25 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 newguy View Post
I installed this mod, and when I un-installed it I now get this error when I make changes to a user group and try to save it.

PHP Code:
Database error in vBulletin 3.8.1:

Invalid SQL:
UPDATE usergroup SET

### UPDATE QUERY GENERATED BY fetch_query_sql() ###
`title` = 'No PM & Posts Are Moderated',
`
description` = '',
`
usertitle` = '',
`
opentag` = '',
`
closetag` = '',
`
passwordexpires` = '0',
`
passwordhistory` = '0',
`
ispublicgroup` = '0',
`
canoverride` = '0',
`
vbblog_general_permissions` = '254328',
`
vbblog_customblocks` = '0',
`
vbblog_custompages` = '0',
`
vbblog_entry_permissions` = '7920',
`
vbblog_comment_permissions` = '896',
`
forumpermissions` = '12390911',
`
genericpermissions` = '1243616707',
`
attachlimit` = '0',
`
pmquota` = '0',
`
pmpermissions` = '0',
`
pmsendmax` = '5',
`
pmthrottlequantity` = '0',
`
calendarpermissions` = '32',
`
wolpermissions` = '0',
`
adminpermissions` = '0',
`
genericpermissions2` = '0',
`
genericoptions` = '62',
`
profilepicmaxwidth` = '100',
`
profilepicmaxheight` = '100',
`
profilepicmaxsize` = '404800',
`
avatarmaxwidth` = '120',
`
avatarmaxheight` = '120',
`
avatarmaxsize` = '404800',
`
signaturepermissions` = '234111',
`
sigpicmaxwidth` = '450',
`
sigpicmaxheight` = '100',
`
sigpicmaxsize` = '404800',
`
sigmaxrawchars` = '1000',
`
sigmaxchars` = '500',
`
sigmaxlines` = '0',
`
sigmaxsizebbcode` = '7',
`
sigmaximages` = '4',
`
albumpermissions` = '254',
`
albumpicmaxwidth` = '600',
`
albumpicmaxheight` = '600',
`
albumpicmaxsize` = '100000',
`
albummaxpics` = '20',
`
albummaxsize` = '0',
`
usercsspermissions` = '63',
`
visitormessagepermissions` = '60',
`
socialgrouppermissions` = '51060',
`
maximumsocialgroups` = '5',
`
groupiconmaxsize` = '404800',
`
trgpermissions` = '5',
`
ms_force_style_permissions` = '0',
`
force_style_id` = ''
WHERE usergroupid=11;

MySQL Error   Unknown column 'ms_force_style_permissions' in 'field list'
Error Number  1054
Request Date  
MondayMarch 9th 2009 09:22:09 PM
Error Date    
MondayMarch 9th 2009 09:22:09 PM
Script        
http://mysite.com/forums/admincp/usergroup.php?do=update
Referrer      http://mysite.com/forums/admincp/usergroup.php?do=edit&usergroupid=11
IP Address    xx.xxx.xx.xxx my IP
Username      
my user name
Classname     
vB_Database
MySQL Version 
5.0.67-community 


At the bottom of each user group pahe in the user group manager there is still the place where you could edit the settings. No text there at all. Just the bullets to select yes or no.

Any one help? I have used the two previous versions for a long time.
You did not do step 1 of Uninstall Instructions (see the first post).
Reply With Quote
  #19  
Old 03-10-2009, 08:22 AM
newguy's Avatar
newguy newguy is offline
 
Join Date: Nov 2007
Location: USA
Posts: 185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, I read right over that.
Reply With Quote
  #20  
Old 03-10-2009, 11:10 AM
Skyrider Skyrider is offline
 
Join Date: Feb 2006
Location: Netherlands
Posts: 1,392
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

2 questions:

Possible you can add the future so people can only pick a theme if they are within a specific usergroup?

and 2:

Possible the force can be done by forum section as well?
Reply With Quote
  #21  
Old 03-10-2009, 05:04 PM
Fungsten's Avatar
Fungsten Fungsten is offline
 
Join Date: Jul 2006
Posts: 1,131
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by FF|Skyrider View Post
2 questions:

Possible you can add the future so people can only pick a theme if they are within a specific usergroup?
Good idea.

Quote:
and 2:

Possible the force can be done by forum section as well?
Yes you can set that in each forum settings.
Reply With Quote
Reply

Thread Tools

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 10:19 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04955 seconds
  • Memory Usage 2,386KB
  • 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
  • (2)bbcode_php
  • (3)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
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (4)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)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