View Full Version : Miscellaneous Hacks - Force Style for Selected Users or Groups
Please click Mark as Installed if you are using this hack.
What Does This Hack Do?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 Compatibilityhr
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 Requestshr
IMPORTANT: This hack is no longer supported.
Install Instructionshr
Unzip ms_force_style_38.zip
Upload bitfield_ms_force_style.xml to your /includes/xml folder.
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.
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).
In the Usergroup Manager edit the usergroup(s) you want to force a style on.
Uninstall Instructionshr
Delete the bitfield_ms_force_style.xml file from your /includes/xml folder.
Uninstall the product in vB using the AdminCP Product Manager.
Version Historyhr
v3.8.001 - Friday 21st November 2008
-- Initial Release
Thankshr
Thanks go out to Paul M who gave me permission to use some of his install code.
Show Your Appreciation 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.
Fungsten
11-21-2008, 05:34 PM
Reserved. :p
crkgb
11-23-2008, 07:24 PM
After reading the "hack support" portion I am scared to use this hack.
Q-v-n-s-Q
11-24-2008, 03:31 AM
just upgrade myboard, gona try it out, thanks
ziggylol
12-28-2008, 08:34 AM
Thank you this hack, it is perfect for my site!
twistedsymphony
01-14-2009, 03:05 PM
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...
Fungsten
01-14-2009, 03:55 PM
Where do you set the Usergroups? TIA.
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):
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.
Where do you set the Usergroups? TIA.
Do step #5 (already in first post):
Installation Instructions
Unzip ms_force_style_38.zip
Upload bitfield_ms_force_style.xml to your /includes/xml folder.
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.
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).
In the Usergroup Manager edit the usergroup(s) you want to force a style on.
Fungsten
01-14-2009, 08:06 PM
Do step #5 (already in first post):
I re-uploaded the bitfile. For some reason it got deleted. Thanks!!
tony adams
01-26-2009, 01:55 PM
installed - many thanks
craig5320
02-10-2009, 09:07 AM
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
smirkley
02-14-2009, 02:07 AM
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?
smirkley
02-15-2009, 02:22 PM
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
smirkley
02-15-2009, 08:53 PM
Ummmm,....
Ok,....nvmnd.
(problem was on my end, forgot I was an admin and I didnt have the child skin enabled.)
Egads.
(tnx again)
newguy
03-10-2009, 12:32 AM
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.
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 : Monday, March 9th 2009 @ 09:22:09 PM
Error Date : Monday, March 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.
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.
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 : Monday, March 9th 2009 @ 09:22:09 PM
Error Date : Monday, March 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).
newguy
03-10-2009, 08:22 AM
Thanks, I read right over that.
Skyrider
03-10-2009, 11:10 AM
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?
Fungsten
03-10-2009, 05:04 PM
2 questions:
Possible you can add the future so people can only pick a theme if they are within a specific usergroup?
Good idea.
and 2:
Possible the force can be done by forum section as well?
Yes you can set that in each forum settings.
Possible you can add the future so people can only pick a theme if they are within a specific usergroup?
Good idea.
Read the What if you need custom style permissions as well? section in the first post. Andreas's hack should do what you want, which is why I will not be adding that to this hack.
OmniBuzz
07-27-2009, 03:51 PM
Not much to say except thank you ! ( a lot)
J534D1DBB363
08-27-2009, 09:50 AM
it didnet work for me.=delet
it didnet work for me.=delet
I need a lot more information to be able to try helping you out, as you have given my nothing at all. Just saying it does not work is no help what so ever.
So, please elaborate as to exactly what the issue is.
Negrosoo
09-30-2009, 06:54 PM
I installed this, Now i have problem unistalling.
Please fix.
I installed this, Now i have problem unistalling.
Please fix.
You are having a problem with it on your forum, it works fine for over 250 other forums, so as far as I know there is no issues.
Without you explaining exactly what the problem is when it is installed on your forum. I can not fix nothing. Saying "i have problem unistalling" explains absolutely nothing to me at all.
RedHacker
09-30-2009, 10:14 PM
This mod select Style with usergroup...? etg Admins....? Others usergroup not show style if not selected...?
This mod select Style with usergroup...? etg Admins....? Others usergroup not show style if not selected...?
Did you actually read the What Does This Hack Do?section of the first post? As that tells you exactly what this hack does.
If you still do not understand what this hack does, the please post exactly what you want to know, as what is posted is not very clear to me.
The vBulletin v4.0.x version of this hack is available here.
rajubd
12-10-2009, 07:06 PM
is this working in vb4
is this working in vb4
What does the post just above yours say???? And also what does it say in the vBulletin Version Compatibility section of the first post??? It is already spelled out.
Hi all,
It is with regret that after over 4 years (and thousands of hours) spent providing free support for my free hacks released here, as of today I will no longer be able to provide support for free.
This is due to being unemployed for a while, being strapped for cash and unable to rely on the virtually non-existent donations from here to help to pay the bills or put food on the table for my family. I am now providing all support for my free hacks released here over at Wolfshead Solutions (http://www.wolfshead-solutions.com) via an annual support subscription (for a small fee).
It does not mean I will be no longer release free hacks, I will, but I will just no longer be supporting them for free.
My free hacks have and always will remain free to download and use. And so will updates/bug fixes.
I will be releasing more free hacks, but if you require any support at all for those free hacks, you will need to purchase an annual support subscription over at Wolfshead Solutions to receive support.
I am really sorry I have to do this, but revenue generated by my programming gigs are now my only source of income, and I can no longer afford the luxury of providing free support here, when that time can be spent creating new commercial products, doing paid work requests or providing paid support to pay the bills.
Thank you for the understanding.
Regards,
Mosh.
JohnBee
06-19-2010, 09:54 AM
It's an interesting hack, but it doesn't work with unregistered not logged in group(pitty)
DamasGate
10-30-2010, 07:08 AM
It's an interesting hack, but it doesn't work with unregistered not logged in group(pitty)
The same problem here.
Any help please?
Thank you
Hi all,
Free support has now been moved back to vBulletin.org.
Please see the first post for more information (and also this thread (http://www.wolfshead-solutions.com/threads/444-Our-quot-vBulletin.org-Hacks-Support-quot-subscription-has-been-scrapped) at Wolfshead Solutions).
Enjoy :)
Regards,
Mosh Shigdar - Wolfshead Solutions.
craig5320
07-13-2011, 08:31 AM
Hi,
Been using your hack for years and it works great, but I've just been asked to use a different skin on a single forum for all users, regardless of any forced styles.
By default style A is forced for all guest users via your hack.
Style B is forced on Forum 1. and set to override users choice.
Logged in as admin I see Style B on Forum 1 and Style A elsewhere - working.
However as a guest I see Style A everywhere as expected but in Forum 1 I get Style C, a deactivated style that is not the one set for Forum 1 or the force style set for guests.
can you shed any light on what the issue might be here? Why it's correctly overriding the forum 1 style but selecting the wrong style when viewing as a guest. Style C is not set as default it's deactivated, whereas the one I expect to see is active.
Hope that makes sense
Craig
labadora
07-23-2011, 01:54 AM
It's an interesting hack, but it doesn't work with unregistered not logged in group
MissKalunji
01-06-2012, 05:42 PM
Works perfectly so far...Thank you
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.