vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Problems with an "old" Plugin (https://vborg.vbsupport.ru/showthread.php?t=290084)

PirateTinman 11-03-2012 01:40 AM

Problems with an "old" Plugin
 
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:
PHP Code:

vB_Template::preRegister('navbar',array('treuhand' => $treuhand));
vB_Template::preRegister('treuhand_tpl',array('treuhand' => $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":
PHP Code:

<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:

Code:

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


All times are GMT. The time now is 01:55 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00987 seconds
  • Memory Usage 1,725KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete