The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Force Style to Certain Usergroup(s) and/or User(s) Details »» | |||||||||||||||||||||||||||
Force Style to Certain Usergroup(s) and/or User(s)
Developer Last Online: Nov 2023
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. Please click Mark as Installed if you are using this hack. vBulletin Version Compatibility This hack has be tested with v3.5.8. This has not been tested with earlier versions, but should work. 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). Background This is inspired by the hack - Restrict Style to Usergroup(s) by Andreas. I asked about a mod to restrict styles to certain usergroups and ended up using Andreas's hack, but did not do the job exactly as I need it, see scenario below to see why did not. 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 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. Solution I created this hack to rectify that and it works in harmony with Andreas's hack. Installation Instructions Instructions and upgrade instructions are in the attachment. Note: No screenshots are needed, so are not provided. Version History v1.02 - Tuesday 28th February 2006 -- Final release -- Fixed: Plugin typo v1.01 - Thursday 23rd February 2006 -- Added: Secondary Usergroups permissions v1.00 - Thursday 23rd February 2006 -- 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
|
Comments |
#22
|
||||
|
||||
If it can not be selected by the user, it can not be used by that user unfortunately and my mod will not work, it is what permissions is all about.
My mod is used in conjunction with Andrea's one (advanced permissions for each style) to force a particular style on a user or a group of users (but the user or group have to have permissions to select/see the style being forced on them). |
#23
|
|||
|
|||
I force a lite style during periods of high server loads. Does anyone know how to add a trigger to this plugin so it would only go active at a defined server load? I suspect it might involve adding another plugin to the global.php hook location. Thanks!
|
#24
|
|||
|
|||
Hey, I'm using this hack to implement a "multi-site" shared forum. Because the sites will be referring hits based on style id (I.E. the affiliate has skin id #2 branded with their logos/ads, so they'd use mysite.com/index.php?styleid=2), Unregistered Users need to have all the skins available to them, and their skin defined via the styleid in the URL.
What change would I have to make? I know absolutely nothing about PHP, but here's the change I tried to make to allow Unregs (usergroup ID #1) to view both skin styleid #1 AND #2 (but let's pretend there's going to be about 6 more). It's giving me a parse error and only showing skin #2.: Code:
if (in_array($vbulletin->userinfo['usergroupid'], array(1)) || (in_array($vbulletin->userinfo['membergroupids'], array(1)))) { $styleid = 1,2; } |
#25
|
||||
|
||||
Quote:
You can not have multiple style ids as you have them, this is what is causing the parse error: Code:
$styleid = 1,2; If you want to restrict say 2 different member groups to one style and say 1 different member group to another style then here is an example of how to do it. Code:
if (in_array($vbulletin->userinfo['usergroupid'], array(2,3))) { $styleid = 1; } if (in_array($vbulletin->userinfo['usergroupid'], array(4))) { $styleid = 2; } |
#26
|
|||
|
|||
Is there any chance that I can use this with 3.6.4?
|
#27
|
||||
|
||||
It should work with v3.6.x
|
#28
|
|||
|
|||
Great! Thanks for your answer!
-------------- Worked like a charm in the test run - thanks so much for this one! |
#29
|
||||
|
||||
You are most welcome
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|