![]() |
Style Permissions
I wanna make it so that certain styles can only be used by members of a certain group. Any suggestions?
|
Quote:
Do you want to restrict access altogether or do you only want to restrict the options shown on the select menu in the usercp? If you only restrict access to the select menu, users can still see styles by adding &styleid=x to the URL... but it's less complicated as far as I know :) |
You could try something like this:
in global.php, find: Code:
// style specified in user profile PHP Code:
(untested) |
Quote:
|
Kodlar biras karışık sanki ?
|
you could look at it from another angle and edit the templates. putting in a conditional to display the ads if the usergroup is not the ad-free usergroup might be easier also that would mean that your paying users wouldn't be limited to just one style to gain their benifits.
|
Quote:
|
Code:
<if condition="$bbuserinfo['usergroupid'] != X">Code to display ads</if> Code:
<if condition="$bbuserinfo['usergroupid'] != X && $bbuserinfo['usergroupid'] != Y">Code to display ads</if> |
Quote:
|
Quote:
|
You will need to replace the "X" and the "Y" with your styleid's (numbers!!).
|
Quote:
|
For the rest this code look perfect sane to me.
Could you post the actual code you're using. |
PHP Code:
|
I must be blind or simply too much tired, but i don't see your error.
And which line is line 266? |
Quote:
PHP Code:
|
Well i did the same edit myself, and no problem.
Please post again (dohh) with the 5 lines before and after the change. |
PHP Code:
|
Try:
PHP Code:
|
Quote:
Many thanks anyway MarcoH64. Any ideas? |
Well i not checked your logic, only removed the error message.
Don't have the time now to have a closer look, if nobody else does, i will try to look tomorrow. |
All times are GMT. The time now is 04:44 PM. |
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:
|