Please can somebody help, I just can't figure out what I'm doing wrong.
I'm trying to add to FORUMHOME and I can't get the basic example working.
I've created a new plugin (hook: forumhome_start) with the following PHP code:
PHP Code:
$my_var = 'abc';
$templater = vB_Template::create('mytemplate');
$templater->register('my_var', $my_var);
$templatevalues['my_insertvar'] = $templater->render();
vB_Template::preRegister('FORUMHOME', $templatevalues);
I've then added the following to the FORUMHOME template:
PHP Code:
<p>{vb:raw my_insertvar}</p>
Am I right in expecting <p>abc</p> to appear in my forum home page source? Because I just get empty <p></p>, i.e. the variable doesn't exist.
I've tried different hook locations. I also tested the forumhome_start location by adding an "echo 'abc'; in the plugin php, and as expected "abc" appears right at the top of my forum home source.
What am I doing wrong? :S
EDIT!:: Apologies, missed this post:
https://vborg.vbsupport.ru/showpost....1&postcount=72