vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   A Hook in a Hook? (https://vborg.vbsupport.ru/showthread.php?t=225284)

Morsolo 10-15-2009 08:07 AM

A Hook in a Hook?
 
Hey Everyone,

My apologies if the title isn't correct, this is my first time properly utilising the Plugin system to write some code for a product I made for myself...

Anyway, I have a code like this in the Plugin PHP Code:

Code:

echo "<form method=\"POST\" action=\"$addcodehere\">\n";
I have my required information for the form in the (in this example) $addcodehere template/hook, but obviously, it doesn't work when it is like that in the PHP Code.

How do I write it so it accepts it? Or do forms ALWAYS need to go to an external file?
- Morsolo

Lynne 10-15-2009 02:47 PM

You shouldn't use echo, you should output to a variable and then use the variable in the template:

PHP Code:

$myvar =  "<form method=\"POST\" action=\"$addcodehere\">\n"



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