So for some time now I have been ripping my hair out trying to figure out how to use my plugin variables in my custom templates. After reading countless threads and articles on preReigsting my variables, I have zero luck in actually accomplishing this task.
Here's my basic ripped plugin example hooking newthread_forum_start
Code:
$my_var = "abc";
$templater = vB_Template::create('newtemplate');
$templater->register('my_var', $my_var);
$myrendervar = $templater->render();
vB_Template::preRegister('newthread',array('myrendervar ' => $myrendervar));
trying to access this variable in newthread using {vb:raw myrendervar} does not work. In fact looking at the debug information "newtemplate" is in bolder red letters. I can easily echo my_var, but I cannot use it in newthead template.
What's the deal? What am I not understanding about plugin variables that's preventing me from using basic ones?