Quote:
Originally Posted by noppid
The template hook, $template_hook['showthread_above_posts'] for example, is the variable you want to populate to display your data. The hook location, showthread_complete for example, is the hook in the php file that you use to load the template variable with your data by rendering a template for instance. You can select these hook locations in the plugin manager drop down when you create a new plugin.
|
OK, that helps a lot. Now, next question. What if I want to render into my own private variable and display as part of the "postbit_legacy" template? For example, if I wanted to render as follows:
$MyVar = $templater->render();
...
I registered my PHP code at postbit_display_start.
Then inside of "postbit_legacy" -- replace {vb:raw post.message} with {vb:raw MyVar}. There appears to be a variable scope problem, or I'm not accessing $MyVar correctly inside of postbit_legacy.
When I render into one of the hooks, the rendered display does show up correctly -- so I know the mechanics of what I'm doing are all correct.