The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Rendering a template in header
Hook Location:
global_start PHP Code:
|
Благодарность от: | ||
Craigr |
#2
|
|||
|
|||
I think the next to the last line should be:
PHP Code:
|
#3
|
||||
|
||||
do u mean with out a array?
well this make it show up all the way on top of the header template? i try it out thanks.. |
#4
|
|||
|
|||
You don't need the array. I think maybe you were confusing two different ways to preRegsiter a variable: you can create an array then use it in the preRegister call, or else you can just use array() directly in the function call.
You will also need to edit your header template and insert {vb:raw teck_brb_temp} where you want it to appear. Another way to get it to appear in your header would be to use a template hook that's already in the header (if there are any - I haven't checked), in which case you'd assign the result of render() to the template hook instead of using preRegister(). |
#5
|
||||
|
||||
how about something like that how can i use that for my need:
PHP Code:
|
#6
|
|||
|
|||
OK, so you're saying you want a plugin that will insert it automatically, so you can release a product and not have to have any template editing instructions? OK, you could try this: use hook process_templates_complete and code like (just showingthe last few lines):
Code:
$templater = vB_Template::create('teck_brb_temp'); $templater->register('teck_brb_temp', $teck_brb_temp); $templater->register('teck_brb', $teck_brb); $header = $templater->render() . $header; But I think that hook was recently added, in vb4.1.10 or so, so it might not work in older versions. For versions before that you might need to do a replacement on $vbulletin->templatecache['header'] which is a little complicated. Here's a post showing an example of one way to do it: https://vborg.vbsupport.ru/showpost....&postcount=211 |
Благодарность от: | ||
Michael.A |
#7
|
||||
|
||||
thanks man it look like it works for me on:
Hook Location: global_start PHP Code:
--------------- Added [DATE]1335978843[/DATE] at [TIME]1335978843[/TIME] --------------- Special Thanks to you for making this.. https://vborg.vbsupport.ru/showthrea...42#post2325542 |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|