NetSlider
05-27-2014, 08:30 AM
Hi,
i try to create my own mod using the HOWTO in "Articles", but nothing works. The "my_test" is cached (not red in debug mode) but the variables are empty or NULL or anything else which makes Problems :D.
plugin1 (Hook: forumhome_start):
$templater = vB_Template::create('my_test');
$templater->register('test1', 22);
$templater->register('test2', 23);
$my_template = $templater->render();
vB_Template::preRegister('FORUMHOME', array('my_test' => $my_template));
plugin2 (Hook: cache_template):
$cache[] = 'my_test';
template-part: (name: my_test)
{vb:raw test1} <br>{vb:raw test2}
inserted line in FORUMHOME:
{vb:raw my_test}
Could anyone say me, where the mistake is?
i try to create my own mod using the HOWTO in "Articles", but nothing works. The "my_test" is cached (not red in debug mode) but the variables are empty or NULL or anything else which makes Problems :D.
plugin1 (Hook: forumhome_start):
$templater = vB_Template::create('my_test');
$templater->register('test1', 22);
$templater->register('test2', 23);
$my_template = $templater->render();
vB_Template::preRegister('FORUMHOME', array('my_test' => $my_template));
plugin2 (Hook: cache_template):
$cache[] = 'my_test';
template-part: (name: my_test)
{vb:raw test1} <br>{vb:raw test2}
inserted line in FORUMHOME:
{vb:raw my_test}
Could anyone say me, where the mistake is?