The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
what exactly is the template engine and how do i use it?
i want to use vb phrases on my non vb pages and was told that u can use the template engine, but i have no idea wat thta is lol any replies would b great thnx |
#2
|
||||
|
||||
![]()
vBulletin has it's own Template Engine, but that does not have thaat much to do with Phrases.
If you want to use the vBulletin Backend, just require global.php and you will be able to use its Template Engine, Language System, etc. |
#3
|
||||
|
||||
![]()
i have required global.php and the phrases work when i use
Code:
<?php echo "$bbuserinfo[username]" ;?> Code:
<phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase> i tried making a custom phrase but i cant get it to work with php variables does anyone know how to either use the phrase tags or to include php variables in custom phrases (if its even possible) ?? |
#4
|
|||
|
|||
![]()
1. Set the 4 required arrays ($phrasegroups, $specialtemplates, $globaltemplates & $actiontemplates), require global.php
2. echo "Phrase: $vbphrase[phrasename]"; 3. echo "Phrase with parameters: " . construct_phrase($vbphrase['phrasename'], $myparameter); |
#5
|
||||
|
||||
![]()
like this ?
Code:
<?php echo "$vbphrase[welcome_x]"; echo "$bbuserinfo[username]".contsruct_phrase($vbphrase[welcome_x],$bbuserinfo[username]); ?> Fatal error: Call to undefined function: contsruct_phrase() in /home/****/public_html/*****/header.php on line 81 have i done something wrong or is it all wrong ? ---------------------------------------------------------------------- right i found out the reason i was getting an error message, it was because i was spelling construct wrong lol, but................ when i put this Code:
<?php echo "$bbuserinfo[username]".construct_phrase($vbphrase[welcome_x],$bbuserinfo[username]); ?> MambocubeWelcome, Mambocube i cant seem to get rid of the username in front any ideas? ------------------------------------------------------------------------- ok i managed to do it by doing this Code:
echo "".construct_phrase($vbphrase['welcome_x'],$bbuserinfo[username]); thnx for the help guys |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|