vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=253)
-   -   Loading custom global templates (https://vborg.vbsupport.ru/showthread.php?t=238134)

Rhyaehar 03-12-2010 10:15 PM

Loading custom global templates
 
I've just spent my entire evening attempting to get a header template to be included in vBulletin and frankly, I'm thinking of throwing VB4 out the window. It's new template system is crap. Whichever VB developer figured it would be a good idea to have the entire html document in about 16 different templates needs to go back to school and stop programming for good. But anyway... I simply cannot get vBulletin to load a custom template. I don't want to use header, headinclude and all the other related rubbish if it means constantly editing a dozen templates due to bad design of this system.

I have a plugin running (on cache_templates) with the following contents:
PHP Code:

$cache array_merge($cache, array('headerfull'));

$templater  vB_Template::create('headerfull');
$headerfull $templater->render(); 

My FORUMHOME template starts with:
Code:

{vb:raw headerfull}
From what I've gathered from various random forum posts here, as vBulletin hasn't even bothered to put documentation up yet, it should be working. It just isn't. I'm getting way too frustrated here. Anyone able to offer some advice on how to load custom templates on every page?

jochem2007 03-18-2010 12:33 PM

Have a look at https://vborg.vbsupport.ru/showthread.php?t=228078 and then the 'Save into an array and preregister to use in an existing/stock template' section. The template has to be preregistered first before you can use it in an existing template.


All times are GMT. The time now is 01:02 AM.

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.01165 seconds
  • Memory Usage 1,713KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)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