The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Individual Forum Colours
Ok im a coder of limited experience and ive been trying to crack this one for a long time to no avail, so im bringing it here in the hope that some of the more experienced guys will be able to help me out
I want to make a forum a certain colour when viewed from a certain style, but not others. For example, if i have three styles, Style 1, 2 and 3. if a user is using style 2 as their style, when they go into general discussion i want them to view it through style 3, but every other forum on my board through style 2. where-as if another member is using style 1 as their style and go into general discussion, i dont want them effected. you guys see what im trying to do with this and does anyone know how it could be done? |
#2
|
|||
|
|||
Unless I do not get what you are trying to do, me thinks this would work...
if ($forumid == x AND $vbulletin->userinfo['styleid'] == y) $vbulletin->userinfo['styleid'] = z; |
#3
|
||||
|
||||
Call me thick if you like but what template/file is this applied to?
|
#4
|
|||
|
|||
You could insert this in the global.php file.
($hook = vBulletinHook::fetch_hook('style_fetch')) ? eval($hook) : false; Are your users allowed to switch styles on their own? |
#5
|
||||
|
||||
Yes.
|
#6
|
|||
|
|||
Then not sure whats the point of forcing a certain style on them if they can simply change it.
You will also need to override the $styleid variable in the same conditional. I have not tested this but its a good place to start. Good luck. |
#7
|
||||
|
||||
Quote:
Other question, does the second style (the one being forced) have to be an active style? i would rather our users not be able to select it. |
#8
|
|||
|
|||
The style does not have to be active.
if ($forumid == 2 AND $vbulletin->userinfo['styleid'] == 1) { $vbulletin->userinfo['styleid'] = 2; $styleid = 2; } That should work but if you want to apply this to a category you will have to expand the conditional to include the forum's children ids. |
#9
|
||||
|
||||
Thats working great, thanks alot for your help man
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|