The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Subscriptions - Styles
Hello all,
If this is not a mod for this, please let me know how I can do it myself. I am not very well experienced with vB's templating system. What I need to do is when a user is added to the usergroup "Sub" (they will automatically be added once they purchase a subscription), to have a few styles only available to them. This means that it will be under their profile options page for this design. If they have not paid, this theme is completely invisible to them. |
#2
|
||||
|
||||
The best thing I can suggest is editing the [high]construct_style_options[/high] function found in [high]/includes/functions.php[/high]
You can state some conditions for if a user is in a certain usergroup or not whether to display it or not - Its a hardcoded way of doing it... Another way would be to create an additional setting for a style, to say whether it is a public or premium style - Then edit the same function as above to check whether it is a premium style, and whether the user is a subscribed user or not... Both would require a bit of work but I suppose I could come up with something Satan |
#3
|
|||
|
|||
Thank you for the quick reply. Could you give me close to exact directions? I'm very new at this .
|
#4
|
||||
|
||||
I'm trying to create a hack based off this for you, but have run into a little difficulty - I should have something later today
Satan |
#5
|
|||
|
|||
Thank you . Post whenever you can!
|
#6
|
|||
|
|||
Does anyone know or can help please?
|
#7
|
|||
|
|||
Well a little update . I did figure it out somewhat, but I am stuck now.
I'm doing this in the header (since it won't display anything else). Code:
<if condition="$bbuserinfo['usergroupid'] == 9"> Allowed <else /> CONFUSED </else> </if> |
#8
|
||||
|
||||
The way you are going about it won't prevent users from setting their styles to ones restricted for certain user groups. All they have to do to get around it is to set the style in their url.
If you truly want to do this right, you need to add a field to the style database that includes which usergroups may use that style. Then you need to set up a way to store that info and change the style dropdowns to only include authorized styles. Finally, you need to change the code (it used to be in global.php) that sets a user's style to ensure that a user isn't using a style they shouldn't. And before you ask, I honestly don't have time to do it for you. I wrote a version for VB2 but never ported it over. |
#9
|
|||
|
|||
Thank you amykhar . I obviosuly don't have skills to do all of that. The way I was going to do would work expect for the way you said it with the URL. I don't mind if they see it for a few minutes as long as they can't use it.
Could you explain to me how to go about it that way or an easier way? |
#10
|
|||
|
|||
Does anyone know how to do it the simple way?
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|