PDA

View Full Version : How To Do Style Specific Plugins


eXtremeTim
13 Nov 2005, 23:23
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


if($vbulletin->userinfo['styleid']=='27')
{


Replace the 27 with the id of the style.

After the end of your plugin code put

}


example
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.