View Full Version : How to include a custom template ???
bigfoot
04-23-2006, 11:44 AM
Hi,
I just created a custom template in vBulletin, but I cant include the template in other templates...
How am I supposed to do ? The want the custom template to be included in the header-template. But it will not work. I also tried to include it in ither templates without any results...
Thanks in advance
DrewM
04-23-2006, 12:13 PM
I think this will help you:
https://vborg.vbsupport.ru/showthread.php?t=101723
bigfoot
04-23-2006, 02:05 PM
Well, now I have made a product, but it still doesn't seem to work...
My product is here...
<?xml version="1.0" encoding="ISO-8859-1"?>
<product productid="navigation_dropdown" active="1">
<title><![CDATA[Navigation Dropdown]]></title>
<description></description>
<version>1.0</version>
<codes />
<templates>
<template name="navigation_dropdown" templatetype="template" date="1145804592" username="Bigfoot" version="1.0"><![CDATA[<select onchange="dropdownLink(this.options[this.selectedIndex].value)">
<option value="">Hurtig menu</option>
<option value="">--------------------------</option>
</select>]]></template>
</templates>
<plugins>
<plugin active="1">
<title><![CDATA[Navigation Dropdown]]></title>
<hookname>global_start</hookname>
<phpcode><![CDATA[if (in_array(THIS_SCRIPT, array('showthread', 'showpost', 'newthread', 'newreply', 'editpost', 'printthread')))
{
$globaltemplates = array_merge($globaltemplates, array(
'navigation_dropdown'
));
}]]></phpcode>
</plugin>
</plugins>
</product>
bigfoot
04-24-2006, 06:09 PM
No one with an answer ???
Oblivion Knight
04-25-2006, 05:56 AM
The plugin looks a little "off" to me..
Firstly, the code you currently have in global_start should be in cache_templates.
To include the template, you want something like this in global_start:
eval('$hurtig = "' . fetch_template('navigation_dropdown') . '";');Then place your $hurtig var in the templates where you want it to be shown.
bigfoot
04-26-2006, 05:24 PM
it worked - thanks a lot
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.