The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Plugin Guides?
Are there any guides or anything that go over plugin development?
I'm trying to upgrade one of my plugins that uses code from vb3.8 and the error I'm getting is Warning: fetch_template() calls should be replaced by the vB_Template class. Where can I read up on the vB_Template Class? --------------- Added [DATE]1274237155[/DATE] at [TIME]1274237155[/TIME] --------------- OK I'm slowly starting to figure this out. I'm following along with this guide, but I'm only getting a blank screen. First, I created a plugin, named Nates Tester (product ID: natestester) Next, I went into the Style Manager, and created a new template in my theme: myCustomTemplate and placed the following code in it: Code:
{vb:raw myScript_variable} Hook Location - This is the part that confuses me, because I can't leave it blank, and I have no idea which hook to choose. For experiment's sake, I chose global_start - should I choose something different? For the Title, I used the same as my plugin name - Nates Tester Execution Order: 5 Plugin PHP Code: as per the guide Code:
$myScript_variable = "Hello there"; $templater = vB_Template::create('myCustomTemplate'); print_output($templater->render()); Then, I refresh the forum and I get a solid white screen. Not quite sure what I'm doing wrong here. I'd appreciate the help --------------- Added [DATE]1274237850[/DATE] at [TIME]1274237850[/TIME] --------------- Oh poot. It looks like that guide I followed left out a critical piece of information I have to register the variable, with this chunk of code: Code:
$templater->register('myScript_variable', $myScript_variable); Code:
$templater = vB_Template::create('myCustomTemplate'); $templater->register('myScript_variable', $myScript_variable); print_output($templater->render()); But, the rest of the forum is gone. all i see is that printed variable. Still tinkin around but making progress |
#2
|
|||
|
|||
where do you want to show your variable?
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|