well your plugin would hook where ever you wish and to access the variable in the header template it would be something like this
{vb:raw random_number}
--------------- Added [DATE]1258370775[/DATE] at [TIME]1258370775[/TIME] ---------------
Lynne thanks I posted there because its a huge design flaw in the new system IMO. I added my own hook name and it works fine but using the str_replace or something is needed I think because the whole point of the plugin system is to NOT make hand edits to files templates etc.
anyway here is the code I posted using etc
Template question for plugins.
Now say for instance I want to show a block of info on forumhome. I know I can do this since the template_hook is now a super global.
Code:
$templater = vB_Template::create('forumhome_addon');
$templater->register_page_templates();
$templater->register('block_info', $block_info);
$template_hook['navbar_end'] .= $templater->render();
That works fine prints the block at the end of the navbar and everything is fine. But I dont want it there. See in vb3 you did a fetch_template and str_replace on the $navbar variable and added your template under so it showed up before your forum list. This is what I want to be able to add a block of info before the $forumbits. Nothing I do a str_replace on works because there is no hook there. The plugin is at forumhome_complete and this does not work
Code:
$templater = vB_Template::create('forumhome_addon');
$templater->register_page_templates();
$templater->register('block_info', $block_info);
$thistemplater = $templater->render();
$search_text = '<div id=\"pagetitle\">';
$vbulletin->templatecache['FORUMHOME'] = str_replace($search_text,$thistemplater.$search_text,$vbulletin->templatecache['FORUMHOME']);
I have tried doing a str_replace for that div tag or forumbits etc. Anyone have any hints on how to get it to work where I want it. Like I said it works fine if like add my new template into the actual template hook but thats the wrong location. There is no hook it seems at the top of the forum which IMO is an oversight on IB's part since in vb3 the top of the forumhome was right after $navbar and now it isnt