The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
A little confused now (calling a template)
Just got vBulletin 4.0.0 Suite set up on my test site for now, trying to get all of my modifications working before I install it on my live site. So, for those of you who have already had the time to play around with vB 4, how do you call templates now.
I USED to do it like in this thread by using the method below PHP Code:
So, anyone know how to call a template via a plugin now? haha (vBulletin 4.0.0 is definately a lot more confusing than I thought it'd be) |
#2
|
||||
|
||||
First, you need to register the variables you will be using in the template and then you need to render it.
Example from one of mine using a template_hook: PHP Code:
PHP Code:
PHP Code:
|
#3
|
|||
|
|||
Hey, thank you for your reply.
Can you please be more specific? What shout i put instead of a_variable, $tagforms, $template_hook['some_hook'], etc? What should be the hook location? |
#4
|
||||
|
||||
Quote:
Code:
<img src="{vb:stylevar imgdir_misc}/paperclip.png" class="inlineimg" /> Code:
{vb:raw template_hook.postbit_signature_end} |
#5
|
||||
|
||||
a_variable is the name of the variable you are registering. $tagforms was supposed to be $a_variable, but I forgot to change it - it is now changed. As for the $template_hook, that would be the name of the template_hook you are trying to use.... if you are using a template_hook. I gave several examples up there - you would not use them all for one template call.
|
#6
|
|||
|
|||
How about if the hook you want does not exist. In vb3 say for instance after navbar you could print a blook right about the forumbits below the navbar. There is no such hook in vb4
http://www.vbulletin.com/forum/showt...on-for-plugins |
#7
|
||||
|
||||
Then either add your own hook or modify the template manually.
|
#8
|
|||
|
|||
Are there tutorials on adding your own hook location?
--------------- Added [DATE]1258332480[/DATE] at [TIME]1258332480[/TIME] --------------- Nevermind got it but still would have not liked to hard code something into forumhome if I did not have to |
#9
|
||||
|
||||
I think I just responded to a thread you made on vb.com. Until they add a hook under the navbar on FORUMHOME, you can just do a str_replace on <div id="pagetitle">
|
#10
|
|||
|
|||
yeah you did I tried the str_replace and it did not work I asked if you knew why it did not.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|