Back to vBulletin 3 Articles

How To Do Style Specific Plugins
by eXtremeTim 14 Nov 2005

Okay since we no longer have the php templates. I came up with the alternative for plugins that I have been using.

I decided to share this little trick. Its nothing fancy but it gets the job done.

First make your plugin.

Then use the following code before the first line in your plugin

PHP Code:
if($vbulletin->userinfo['styleid']=='27')

Replace the 27 with the id of the style.

After the end of your plugin code put
PHP Code:

example
PHP Code:
if($vbulletin->userinfo['styleid']=='27')
{
global 
$globaltemplates;

$globaltemplates array_merge($globaltemplates, array('header_bottomnav',
'header_dropdownnav',
'header_topnav'));

In the above example that I use on my site it catches three templates for a certain styles.

I hope this helps some of you out.

vblts.ru supports vBulletin®, 2022-2024