The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Automatic Template Edits
I am trying to get:
{vb:raw affiliation} To display my affiliation template within the forumhome template, but I am having no luck. It doesn't display anything when I place {vb:raw affiliation} in my FORUMHOME template. hook - global_start Code:
$templater = vB_Template::Create('affiliation'); vB_Template:reRegister('FORUMHOME',array('affiliation' => $affiliation)); $affiliation .= $templater->render(); |
#2
|
||||
|
||||
PHP Code:
|
#3
|
|||
|
|||
I get a server error when using that code.
|
#4
|
||||
|
||||
You need to create and render a template and then preregister that variable for use in another template.
PHP Code:
Also, if you look up the hook global_start in the files, you'll see this: PHP Code:
|
#5
|
|||
|
|||
I used global_start with no problems, but as soon as I add your code, I get server errors. It works no problem before the code was added. Hooks work fine, but I would like to be able to place it anywhere in the forumhome. As soon as I add your code in place of mine, I get server errors.
Code:
$templater = vB_Template::create('affiliation'); $template_hook[forumhome_wgo_pos5] .= $templater->render(); |
#6
|
||||
|
||||
You can't add exactly my code since I didn't input any variables to register in your template. Also, we can't help with errors if you don't tell us exactly what error you are getting. It would also help to actually see the affiliation template code.
Also, I accidentally wrote "reRegister" instead of "preRegister" in mine above which I have since fixed. Also, <center> tags still work these days also, but they are deprecated. One of these days they will stop working, just as the global_start hook location will stop working. I've always figured it's best to fix that now, rather than when it gets broken, but that is your call.What is the code you posted for? |
#7
|
|||
|
|||
What variables, this is what I don't understand. I don't have any variables. I simply just want the affiliation code to display in forumhome.
If global_start and center are going to be gone soon, what will be their replacing counterparts? Everyone uses <center> I don't know why it would be depreciated... |
#8
|
||||
|
||||
I've never seen it done like this before. Does this actually work?
|
#9
|
|||
|
|||
No... apparently there are some variables that I don't know about, because it is still not working.
|
#10
|
||||
|
||||
What hook are you using to call the template from?
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|