PDA

View Full Version : PHP include plugin not working on CMS pages


DesignWerks
27 Nov 2009, 15:05
I created a global_start plugin with the following code and placed the {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.


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
27 Nov 2009, 17:26
The CMS pages do not call the global_start hook.

Possibly try global_state_check instead.

DesignWerks
27 Nov 2009, 21:35
Perfect! Thank you!

manuel.ho
24 Mar 2010, 03:38
He works perfect in the forum, but the page vbadvanced the php file is not displayed, any ideas please?

webmaster74
19 Jan 2011, 04:13
The CMS pages do not call the global_start hook.

Possibly try global_state_check instead.


Thank you Paul.