vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   help! PHP include to vb template ? (https://vborg.vbsupport.ru/showthread.php?t=257051)

ehsanix 01-13-2011 08:56 AM

help! PHP include to vb template ?
 
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/t..._externalfiles

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

ob_start();
  include(
'mami.php');
  
$includedphp ob_get_contents();
  
vB_Template::preRegister('custom_mami',array('includedphp ' => $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/showt...m-global_start

That should explain it ;).

ehsanix 01-13-2011 05:21 PM

Must file
global. Php
The following line
PHP Code:

($hook vBulletinHook::fetch_hook('global_start')) ? eval($hook) : false

I changed?
PHP Code:

($hook vBulletinHook::fetch_hook('global_start')) ? eval($hook) : true

--------------- Added [DATE]1294964362[/DATE] at [TIME]1294964362[/TIME] ---------------

help plssss :(


All times are GMT. The time now is 07:50 AM.

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.02428 seconds
  • Memory Usage 1,720KB
  • 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
  • (3)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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