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 10:49
Force Style on Specific Usergroup wrongful vBulletin 3.0 Template Modifications 1 16 Aug 2004 14:33

Comments
  #2  
Old 22 Feb 2006, 16:58
RoryF RoryF is offline
 
Join Date: Apr 2005
Exactly what i need. Thankyou for making this hack . Well done .
Reply With Quote
  #3  
Old 22 Feb 2006, 20:34
WAR WAR is offline
 
Join Date: Jan 2004
Just to clarify, you said that this works just fine in conjunction with Andreas' Restrict Style to Usergroup(s) hack without any conflict?

Also: Does this work with secondary usergroups as well?

Last edited by WAR; 22 Feb 2006 at 20:37.
Reply With Quote
  #4  
Old 22 Feb 2006, 23:24
Mosh's Avatar
Mosh Mosh is offline
 
Join Date: Aug 2004
Location: Melbourne, Australia
Real name: Mosh Shigdar
Originally Posted by WAR
Just to clarify, you said that this works just fine in conjunction with Andreas' Restrict Style to Usergroup(s) hack without any conflict?

Also: Does this work with secondary usergroups as well?
Yes, no conflicts at all.

Not in it's current state, but I will put that in, in a bit for you
Reply With Quote
  #5  
Old 23 Feb 2006, 00:36
Mosh's Avatar
Mosh Mosh is offline
 
Join Date: Aug 2004
Location: Melbourne, Australia
Real name: Mosh Shigdar
Now Zip file has now been updated to deal with Secondary Usergroups.
Reply With Quote
  #6  
Old 27 Feb 2006, 13:12
christianjunk christianjunk is offline
 
Join Date: Feb 2006
Hi!

There's an error in your code:


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

You forgot a closing ")" in the if-statement (before "{") ...

Regards,
Christian
Reply With Quote
  #7  
Old 27 Feb 2006, 15:09
Mosh's Avatar
Mosh Mosh is offline
 
Join Date: Aug 2004
Location: Melbourne, Australia
Real name: Mosh Shigdar
Originally Posted by christianjunk
Hi!

There's an error in your code:


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

You forgot a closing ")" in the if-statement (before "{") ...

Regards,
Christian
Thanks for noticing that typo updated the zip file.
Reply With Quote
  #8  
Old 19 Apr 2006, 15:09
ToyotaDiesel ToyotaDiesel is offline
 
Join Date: Jan 2006
.......

Last edited by ToyotaDiesel; 19 Apr 2006 at 18:35.
Reply With Quote
  #9  
Old 19 Apr 2006, 19:20
ToyotaDiesel ToyotaDiesel is offline
 
Join Date: Jan 2006
I have secondary usergroups that i can't get it to work with.

for instance:

Works with Usergroup 12 and 2, not with 17, 24, and 29.

Is there a cap on usergroup id#s?

Thanks
Reply With Quote
  #10  
Old 19 Apr 2006, 19:52
ToyotaDiesel ToyotaDiesel is offline
 
Join Date: Jan 2006
I cannot get it to work with a usergroupid higher than 12. (my usergroups jump from 12 to 17 btw)

Works on 12. down.

Doesnt work on 17, up.

(I'm trying secondary usergroups btw)

Last edited by ToyotaDiesel; 19 Apr 2006 at 19:54.
Reply With Quote
  #11  
Old 20 Apr 2006, 14:46
ToyotaDiesel ToyotaDiesel is offline
 
Join Date: Jan 2006
Anyone? I'm getting by using the user level version, but the usergroup script would make it alot easier to see whos in the group and whos not.
Reply With Quote
  #12  
Old 20 Apr 2006, 18:05
Mosh's Avatar
Mosh Mosh is offline
 
Join Date: Aug 2004
Location: Melbourne, Australia
Real name: Mosh Shigdar
Post the Style ID you want to restrict to certain groups, and the primary and secondary membergroups you want to limit. And I will PM you the script with the appropriate info already in it.

So do it as:

Style ID:
Primary Groups:
Secondary Groups:
Reply With Quote
  #13  
Old 20 Apr 2006, 19:04
ToyotaDiesel ToyotaDiesel is offline
 
Join Date: Jan 2006
thanks. This is what I was using

if (in_array($vbulletin->userinfo['usergroupid'], array()) || (in_array($vbulletin->userinfo['membergroupids'], array(29))))
{
$styleid = 9;
}


Style ID: 9
Primary Groups: none
Secondary Groups: 29
Reply With Quote
  #14  
Old 21 Apr 2006, 02:27
Mosh's Avatar
Mosh Mosh is offline
 
Join Date: Aug 2004
Location: Melbourne, Australia
Real name: Mosh Shigdar
Try this instead:


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

Tell me if that works.

Last edited by Mosh; 09 May 2006 at 01:52.
Reply With Quote
  #15  
Old 21 Apr 2006, 15:17
ToyotaDiesel ToyotaDiesel is offline
 
Join Date: Jan 2006
Thanks. I get this at the top of the page with that line

Parse error: parse error, unexpected '{' in /home/public_html/forums/global.php(233) : eval()'d code on line 2
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 03:48.

Layout Options | Width: Wide Color: