![]() |
Restrict style to Usergroup
Description
This hack allows you to restrict the usage of styles to certain usergroups. Hack Details Files to Edit = 4 Queries to Run = 1 Difficulty = Medium History 0.1 Initial Version 0.2 Fixed a typo in the query, thanks to nexialys 0.3 Fixed a Bug which caused Problems with Primary Usergroups Developed and tested with 3.0.7, but should work with all 3.0.x-Versions. |
This would go good in conjuction with subscription services.
|
That's possible.
Create an additional usergroup, restrict usage of your premium styles for this usergroup and then create a subscription which adds the user to this usergroup. |
I'm looking for soomething like this where if I have multiple sytles, but only want me to see them (because I'm working on them) only I see the chooser box.
Anything like that around? |
Quote:
|
KirbyDE, the query is having an error... VACHAR instead of VARCHAR.. ;)
great hack ! |
I hate typos ;)
Thanks, fixed. |
FINALLY
thanks kirb. |
thanks a lot.
|
Would be nice to know if it does what it is meant do do - lol.
|
Installed and working great :D
|
I LOVE YOU KIRBY!
Okay, maybe not love but thanks! |
Quote:
|
If you are the only user in Usergroup Administrators - yes.
|
Great hack!
Tnx! |
Quote:
In a nice hetero male bonding sort of way. :nervous: |
I don't want to sound ungraceful, but i'd prefer a woman to love me ;)
|
Quote:
|
Aww man I just thought about how I am going to take your nice hack and turn it dirty....
NAKED GIRLS SKIN! YES! |
Quote:
|
Quote:
Dude im not joking either... Already working on it.... Oh the gif new post icons is sweet! |
Quote:
|
Quote:
|
Lets just say that they are motivated to post a long post......
|
I love this hack. It's exactly what I was looking for. Thanks for sharing your work.
What I did on my board was to add a style to subscribers that doesn't include ad's now. Hopefully this will encourage a little more donations. |
thanks a lot
|
when i select a user group for the style to be used on, the style is not showing up anymore. any ideas?
|
yea as soon as i select a usergroup to be able to select the style, it just removes itself from the drop down.
using vb 3.0.0 |
I am not sure if this does work with 3.0.0 ...
If you set a Style to be only usable for Usergroup X, then only Usergroup X will see the Style in the Style-Selector Dropdown in UserCP or the Quick Style-Chooser at the bottom of each page. This is how it should work. |
Quote:
Did you also set it for admins to view. I have an additional usergroup set up for my style. |
Works great. Thank you.
|
ive checked the box for the admins to view and it removed it from the drop down.
when i select a box for any usergroup to be able to use the style, i loose it in the drop down, but if i have it activated for all to see, the style shows in the drop down. |
Same problem here. Once I've selected the style, it completely vanishes from the drop-down menu..... even if I change to a different style.... it doesn't re-appear and I can't re-select it from the menu.
OK edit. This appears to only take into consideration secondary usergroups. I create a styles usergroup and anyone who is in this as secondary can see the additional styles in the dropdrown menus. |
Strange. Does work just fine for me and I cannot reproduce the problem.
@nighteyes Which Version do you use? If you don't mind, pease send me a PM with an ACP and FTP account for your site so I can take a look at what is going wrong. |
See above edit Kirby. Is this the way it's supposed to work? :)
|
No, but there was a bug in the instructions.
PHP Code:
PHP Code:
Does it also work with primary usergroups when you change this? |
Yep that fixes the problem. Thanks for posting a fix so quickly. :)
|
This may be a dumb question, but what does editing global.php do? When I edited it, it kept giving me parse errors so I reverted to a saved backup of the file. The hack still works.
|
Without the global.php edit Users can still use any Style (that has User Select = Yes).
If you get parse errors, you did not make the edit correctly - check again. |
I see. They cannot select a restricted style from the dropdown menu, but they can still type the direct url of the board with that style and see it. Like http://www.mysite.com/index.php?s=&styleid=10 if Style #10 was restricted.
This is the parse error I keep getting. The edits for global.php are not very hard and i've tried it 4 or 5 times and still keep getting the error. Quote:
|
All times are GMT. The time now is 05:51 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|