Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Force Style to Certain Usergroup(s) and/or User(s) Details »
Force Style to Certain Usergroup(s) and/or User(s)
Mod Version: 1.02, by Mosh (Coder) Mosh is offline
Developer Last Online: Jun 2013 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 3.5.x Rating: (1 vote - 5.00 average) Installs: 29
Released: 22 Feb 2006 Last Update: 27 Feb 2006 Downloads: 76
Not Supported Uses Plugins Re-usable Code Translations  

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.

Download Now

Only licensed members can download files, Click Here for more information.

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
Force Particular Style on Banned Usergroup wrongful vBulletin 3.0 Full Releases 2 29 Jan 2006 09:49
Force Style on Specific Usergroup wrongful vBulletin 3.0 Template Modifications 1 16 Aug 2004 13:33

  #16  
Old 21 Apr 2006, 14:24
ToyotaDiesel ToyotaDiesel is offline
 
Join Date: Jan 2006
I added a close parenthesis, and it fixed the parse error listed above, but otherwise the code is working the same.

It works fine with all secondary usergroups with an id# of less than 12.
Reply With Quote
  #17  
Old 21 Apr 2006, 14:33
ToyotaDiesel ToyotaDiesel is offline
 
Join Date: Jan 2006
Usergroup ids 13-16 were deleted. Would this lack of ID #s cause a problem? Seems like thats where the problem starts. Nothing greater than that block of deleted ids will work.
Reply With Quote
  #18  
Old 23 Apr 2006, 02:19
Mosh's Avatar
Mosh Mosh is offline
 
Join Date: Aug 2004
Location: Melbourne, Australia
Real name: Mosh Shigdar
You may need to rebuild your Styles to get this to work.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

.

If that does not work, then I do not have a clue, as it should work as advertised.
Reply With Quote
  #19  
Old 24 Apr 2006, 01:07
Mosh's Avatar
Mosh Mosh is offline
 
Join Date: Aug 2004
Location: Melbourne, Australia
Real name: Mosh Shigdar
ToyotaDiesel, I had a thought, if you are using this mod with Restrict Style to Usergroup(s) by Andreas, then make sure the style you are using for this secondary member group has the correct permissions for the group to be able to use it.
Reply With Quote
  #20  
Old 07 May 2006, 05:31
Warlock40 Warlock40 is offline
 
Join Date: Mar 2006
Originally Posted by ToyotaDiesel
Usergroup ids 13-16 were deleted. Would this lack of ID #s cause a problem? Seems like thats where the problem starts. Nothing greater than that block of deleted ids will work.

Initially I had the same problem. I could not get a specific style to work.
My problem was that I had the style set as "not user selectable"
so members could not pick it.

So to get have my cake and eat it to. I uploaded andreas hack http://www.vbulletin.org/forum/showthread.php?t=95910
and then allowed the style to be select by a specific user group, and then used this hack to set it as a default for that user group.

I also had this set as a default for a cmps page different from my home but in order to keep that I then just created a child and set that to non user selectable and pointed it to my cmps page so that it could get style (as the other was restricted.

So now members who are new or visit the specific page or forum area or are part of a specified usergroup can enjoy this style.

Thanks for the hack.

Oh and if there is an easier way to make this so it can be used by non user selectable styles I'll be happy to change it all back..it will save me some keystrokes down the road.
Reply With Quote
  #21  
Old 09 May 2006, 00:51
Mosh's Avatar
Mosh Mosh is offline
 
Join Date: Aug 2004
Location: Melbourne, Australia
Real name: Mosh Shigdar
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).
Reply With Quote
  #22  
Old 30 Jan 2007, 20:46
beano33 beano33 is offline
 
Join Date: Feb 2003
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!
Reply With Quote
  #23  
Old 14 Mar 2007, 06:04
The Equivocate The Equivocate is offline
 
Join Date: Sep 2004
Location: Chicago
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.:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #24  
Old 18 Mar 2007, 23:53
Mosh's Avatar
Mosh Mosh is offline
 
Join Date: Aug 2004
Location: Melbourne, Australia
Real name: Mosh Shigdar
Originally Posted by The Equivocate View Post
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.:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.
This is only to force a 1 style on member group(s).

You can not have multiple style ids as you have them, this is what is causing the parse error:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

If you want to have guests use all styles then do not use this hack. Only use this hack for the member groups you want to restrict to a particular style.

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.

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Also please click INSTALL, as you said you are using this hack.
Reply With Quote
  #25  
Old 23 Mar 2007, 06:16
lostgirl815 lostgirl815 is offline
 
Join Date: Apr 2006
Is there any chance that I can use this with 3.6.4?
Reply With Quote
  #26  
Old 24 Mar 2007, 21:34
Mosh's Avatar
Mosh Mosh is offline
 
Join Date: Aug 2004
Location: Melbourne, Australia
Real name: Mosh Shigdar
Originally Posted by lostgirl815 View Post
Is there any chance that I can use this with 3.6.4?
It should work with v3.6.x
Reply With Quote
  #27  
Old 24 Mar 2007, 21:37
lostgirl815 lostgirl815 is offline
 
Join Date: Apr 2006
Great! Thanks for your answer!

--------------

Worked like a charm in the test run - thanks so much for this one!

Last edited by lostgirl815; 24 Mar 2007 at 22:44.
Reply With Quote
  #28  
Old 26 Mar 2007, 07:26
Mosh's Avatar
Mosh Mosh is offline
 
Join Date: Aug 2004
Location: Melbourne, Australia
Real name: Mosh Shigdar
Originally Posted by lostgirl815 View Post
Great! Thanks for your answer!

--------------

Worked like a charm in the test run - thanks so much for this one!
You are most welcome
Reply With Quote
  #29  
Old 02 Apr 2007, 22:11
Mosh's Avatar
Mosh Mosh is offline
 
Join Date: Aug 2004
Location: Melbourne, Australia
Real name: Mosh Shigdar
The official v3.6.x version of this modification is now available from here.

Thanks for your patience, and hope all of you users with v3.6.x will enjoy this ported mod
__________________
-- The WS Spiders List is still downloadable from vBulletin.com.
-- As of Monday 1st July 2013, I will no longer be supporting my hacks as I am leaving the vBulletin community due to medical and life-style reasons.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

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


New To Site? Need Help?

All times are GMT. The time now is 02:58.

Layout Options | Width: Wide Color: