vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   PHP include plugin not working on CMS pages (https://vborg.vbsupport.ru/showthread.php?t=228995)

DesignWerks 11-27-2009 01:05 PM

PHP include plugin not working on CMS pages
 
I created a global_start plugin with the following code and placed the
Code:

{vb:raw includedphp_main}
in the header. It works fine on the Forum and Blog pages but does not appear on the home page or any other CMS pages.


Code:

ob_start();
  include('global_mainphoto.php');
  $includedphp_main = ob_get_contents();
ob_end_clean();

$preRegister['includedphp_main'] = $includedphp_main;
vB_Template::preRegister('header', $preRegister);


Paul M 11-27-2009 03:26 PM

The CMS pages do not call the global_start hook.

Possibly try global_state_check instead.

DesignWerks 11-27-2009 07:35 PM

Perfect! Thank you!

manuel.ho 03-24-2010 01:38 AM

He works perfect in the forum, but the page vbadvanced the php file is not displayed, any ideas please?

webmaster74 01-19-2011 02:13 AM

Quote:

Originally Posted by Paul M (Post 1921669)
The CMS pages do not call the global_start hook.

Possibly try global_state_check instead.


Thank you Paul.


All times are GMT. The time now is 09:13 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
  • Page Generation 0.01019 seconds
  • Memory Usage 1,714KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_quote_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