![]() |
Plugin for specific styleid
Been trying to write a plugin that will have effect on only one (or only) style installed.
I have tried PHP Code:
I also tried PHP Code:
I am missing something, anybody have suggestions pretty please. p.s. another thing, should the plugin run at 'parse_templates' or 'style_fetch'. The code is PHP Code:
|
I think parse_templates is good, and at that hook it looks like $vbulletin->userinfo[styleid] should have worked. You could also try $styleid but put in a "global $styleid;" line first.
|
Many thanks for the really fast reply, I will play.
Please excuse my ignorance, what do you mean by: Quote:
|
Quote:
Code:
global $styleid; But like I mentioned above, I don't see why $vbulletin->userinfo[styleid] shouldn't work. |
Thats great. I will try this now.
Quote:
Using the 'global $styleid;' first certainly triggers the template replacement, but what happens now is that both the original and replacement templates are trying to display... Ahh! just had a thought. Think I know whats happening, I'll let you know later. |
PHP Code:
PHP Code:
PHP Code:
|
I usually use the STYLEID constant.
|
Quote:
|
Some more examples
Code:
if ($vbulletin->session->vars['styleid'] == X) Code:
if ($vbulletin->session->vars['styleid'] != X) |
Hey guys, such a response. Thankyou all.
Too late in the evening to play right now, mrs will torture me!! will let you know how it went in the morning (the coding I mean). Thanks again. |
All times are GMT. The time now is 03:56 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:
|