PDA

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


DesignWerks
11-27-2009, 01:05 PM
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
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
The CMS pages do not call the global_start hook.

Possibly try global_state_check instead.


Thank you Paul.