vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   How to include a custom template ??? (https://vborg.vbsupport.ru/showthread.php?t=113842)

bigfoot 04-23-2006 11:44 AM

How to include a custom template ???
 
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...

Code:

<?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:
Code:

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


All times are GMT. The time now is 07:00 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
  • Page Generation 0.01101 seconds
  • Memory Usage 1,723KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete