PDA

View Full Version : help! PHP include to vb template ?


ehsanix
01-13-2011, 08:56 AM
Hi
I have a php file and I've written in the new template I add that I've made
- My name is mami.php and is located on the root Association:
http://www.forum.x.com/mami.php

- I got under the Help function:
http://www.vbulletin.com/docs/html/templates_externalfiles

- I built the first plug-in and the value it gave:

ob_start();
include('mami.php');
$includedphp = ob_get_contents();
vB_Template::preRegister('custom_mami',array('incl udedphp ' => $includedphp));
ob_end_clean();

- This plug-type global_start and on.

- Then a template I created called custom_mami
I wrote the following code in it :
{vb:raw includedphp}

But when I call the address below does not display anything:

http://www.forum.x.com/misc.php?do=page&template=mami

help plzzzzz

TheLastSuperman
01-13-2011, 04:58 PM
See here:
http://www.vbulletin.com/forum/showthread.php/358695-Inject-into-header-template-from-global_start

That should explain it ;).

ehsanix
01-13-2011, 05:21 PM
Must file
global. Php
The following line
($hook = vBulletinHook::fetch_hook('global_start')) ? eval($hook) : false;
I changed?
($hook = vBulletinHook::fetch_hook('global_start')) ? eval($hook) : true;

--------------- Added 1294964362 at 1294964362 ---------------

help plssss :(