![]() |
Includes plugin won't work in STANDARD ERROR template
I stumped. I'm having a problem getting an includes plugin to display on the STANDARD ERROR template. The plugin works fine in every other template, but won't load for that one. Any suggs?
|
Cannot suggest anything without some code to look at :(
|
Its just a standard includes plugin similar to:
ob_start(); include('path/to/this/file/myfile.php'); $includedphp = ob_get_contents(); ob_end_clean(); The plugin works on dozens of other templates, so I am guessing that something about STANDARD_ERROR doesn't allow the use of an includes plugin for security or some other reason. What I'm looking for is advice on including a php page on the STANDARD_ERROR template. Thanks. |
It all depends on the hook used. Did you go into debug mode and verify the plugin hook you are using is being called on that page?
|
Also, try using {$GLOBALS['includedphp']} in place of $includedphp (in the template)
|
Very interesting. The plugin was using the hook global_start, which works for every other template I've tried. Also, in debug mode when displaying the STANDARD_ERROR template, in this case, the permissions error one might see when posting a new thread while not logged on, these are the "Hooks Called" according to the debug:
init_startup cache_permissions fetch_foruminfo style_fetch cache_templates global_start parse_templates global_setup_complete newthread_start error_nopermission error_fetch forumjump navbits navbits_complete error_generic What is interesting is that global_start is listed, however the plugin wouldn't work until switched to the "error_generic" hook. Am I misinterpretting what the debug output means when it lists the hooks? Is there something funky about using the global_start hook on the STANDARD_ERROR template? In any case, seem to have got what I need working, but a little confused about why global_start wouldn't work with this template. Thanks Lynn and KH_99 as always for your input! --------------- Added [DATE]1367346967[/DATE] at [TIME]1367346967[/TIME] --------------- KH99. You're solution got it working with the global_start hook. Any implications to using the {$GLOBALS['include']} syntax in terms of load or security? |
Quote:
Code:
global $includedphp; but as far as I know there's no difference between using that and using $GLOBALS. |
All times are GMT. The time now is 03:28 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|