The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Using template class
Hello.
I am converting my forum on phpbb to vBulletin. I have portal integrated into my forum. I wanted to use vB template class in my portal, but I cannot find info about how to parse informations into my templates file. Could you tell me, where can I declare variable of template file? Thanks in advance |
#2
|
|||
|
|||
Here's an article on registering variables to templates, in case that helps: https://vborg.vbsupport.ru/showthread.php?t=228078
|
#3
|
|||
|
|||
So if I want to my use my template, then I put the code of template in Style manager and then
$templater = vB_Template::create('portal'); print_output($templater->render()); where 'portal' is a title of template in style manager? If yes, then I am doing something wrong, because nothing is not generating |
#4
|
|||
|
|||
$templater->render() returns a string, so just calling it doesn't produce anything. if your portal template represents and entire html document, then you can call print_output(), like
Code:
$templater = vB_Template::create('portal'); print_output($templater->render()); If the portal template isn't an entire document, then you need to save the string in a variable, then use it in another template. |
#5
|
|||
|
|||
Thanks for help but my mistake was that, I added template into not default style but second style.
Regards |
#6
|
|||
|
|||
I have one more question about template class.
The conditions like <vb:if> are working just on global variables. Is there way to use my own variables without changing class code? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|