PDA

View Full Version : Problems with an "old" Plugin


PirateTinman
11-03-2012, 01:40 AM
I code a Plugin a few month ago, and after servercrach i have to reinstall everything. But, one of my plugins, i cant use, becourse, i don't know, how to include it, into the template.

this is the plugin-code-snipped:
vB_Template::preRegister('navbar',array('treuhand' => $treuhand));
vB_Template::preRegister('treuhand_tpl',array('tre uhand' => $treuhand)); //ausgabe
$template_hook['navtab_done'] .= vB_Template::create('treuhand_tpl')->render();

there is an "treuhand_tpl" in the "change-template-area" called "treuhand_tpl":
<div class="block" id="treuhand_template">
<h2 class="blockhead"><div style='float:left'>Treuhandverwaltung</div></h2>
<div class="blockbody settings_form_border">
<div class="blockrow">
{vb:raw treuhand}
</div>
</div>
</div>


but i don't know, how to include it into the Forumhome or forumdisplay, becourse i forget to write it down on a sheet of paper :D

i hope, anybody can help me.

greetings Pirate

kh99
11-03-2012, 09:23 AM
It looks like your plugin tries to add it to the navbar template. It sets $template_hook['navtab_done'], but that template hook doesn't appear to exist. So, you can insert $template_hook['navtab_done'] in any template, or use {vb:raw treuhand} in the navbar template.

PirateTinman
11-03-2012, 01:10 PM
if i would add it to the forum-home?
what should i change.
the plugin-hook is "global_start", if i see the lpugin-list.

greetings

kh99
11-03-2012, 03:02 PM
If you want to add it to the FORUMHOME template, then you could use hook forumhome_complete. If you want it to be in the navbar template but only appear on the forum home page, then use hook parse_template, and enclose your plugin code in an if statement like:

if (THIS_SCRIPT == 'index')
{
// existing code here
}

PirateTinman
11-03-2012, 04:11 PM
oay, everythinks works perfect.
Thank you very much for your quick and helpful answers.

where can i find some infos about acp-plugins and how to code plugins for acp?

greetings