vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   template hook in postbit not working (https://vborg.vbsupport.ru/showthread.php?t=256147)

Paul K 12-29-2010 08:10 PM

template hook in postbit not working
 
Heyho,

This is in the postbit_legacy: {vb:raw template_hook.postbit_userinfo_right_after_posts}
I've added a plugin with the hook locaiton set on that place, but whatever I'm typing in the plugin PHP field, it just not showing up... Any ideas? (yes It's active)

Thanks

Digital Jedi 12-29-2010 08:19 PM

Would need to see the plugin code to know for sure why it's not working.

Paul K 12-29-2010 08:21 PM

"Plugin PHP Code Use this field to enter the PHP code that you would like to be run. "
I tried:
<?php echo 'test';?>
TEST
echo 'test';

I guess at least 1 should be working so I guess it's not in the typestyle

Digital Jedi 12-29-2010 08:29 PM

Well, for one, you don't use PHP tags in a plugin. I don't know if you can just write it out like that. Have you tried str_replace, yet?

Paul K 12-29-2010 08:32 PM

I summed up 3 things I've tried, just raw echo 'test'; or just "TEST" didn't work either :(

Digital Jedi 12-29-2010 08:35 PM

Try a str_replace if all you're doing it trying to put some simple code in the template. I don't think echo is enough to do anything.

Paul K 12-29-2010 08:37 PM

According to other stuff I tried ( Just doing TEST) in the file, it should be working (on another hook location it did work) but not on this one :/ (The standard set it did work, the added ones didn't )

Lynne 12-29-2010 10:07 PM

First of all, which hook location are you using for your plugin?

Second of all, if you are wanting to insert something where there is a template hook, you need to write something like this in the plugin:
Code:

$template_hook['whatever'] = 'TEST';


All times are GMT. The time now is 12:03 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.01144 seconds
  • Memory Usage 1,717KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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