vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Plugin hook locations (https://vborg.vbsupport.ru/showthread.php?t=244952)

cfish 06-20-2010 03:50 PM

Plugin hook locations
 
I would like to add a plugin using a hook location in the postbit_legacy template.

The code has been tested in place as a hack and works well.

BUT, when I go to Add New Plugin in AdminCP, the hook I want is not listed in the Hook Location drop-down. Am I missing something? :confused:

ChopSuey 06-20-2010 03:56 PM

What have you named it? It should show.

cfish 06-20-2010 05:35 PM

1 Attachment(s)
Quote:

Originally Posted by ChopSuey (Post 2056468)
What have you named it? It should show.

I haven't got to the point of naming it yet. I want it located at postbit_userinfo_right_after_posts but the only postbit hook locations listed in the drop-down are those shown in this screen grab:

Attachment 118645

In fact, I don't recognise those as being hook locations at all.

Sorry, this is my first attempt at a plugin and I seem to have stumbled at the first hurdle.

James Birkett 06-20-2010 05:45 PM

postbit_userinfo_right_after_posts is a template hook I think?

PHP Code:

$template_hook[postbit_userinfo_right_after_posts

That's not a plugin hook, it's a template hook.

Boofo 06-20-2010 06:04 PM

Quote:

Originally Posted by cfish (Post 2056537)
I haven't got to the point of naming it yet. I want it located at postbit_userinfo_right_after_posts but the only postbit hook locations listed in the drop-down are those shown in this screen grab:

Attachment 118645

In fact, I don't recognise those as being hook locations at all.

Sorry, this is my first attempt at a plugin and I seem to have stumbled at the first hurdle.

That listing is for plugin hooks which are located in the vb files. Template hooks are located in the templates. Two totally different entities. James Birkett above gave you what you need for what you are trying to do.

cfish 06-20-2010 06:38 PM

Ah, sorry, I've obviously misunderstood the process.

What I'm trying to do is to add some additional code at a template hook location. Could someone point me in the right direction or suggest an appropriate tutorial?

ChopSuey 06-24-2010 01:04 PM

use the display_complete?


All times are GMT. The time now is 07:12 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.00984 seconds
  • Memory Usage 1,726KB
  • 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_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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