vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Please Help! phpinclude_start gone... (https://vborg.vbsupport.ru/showthread.php?t=92258)

ThePimp 07-15-2005 01:04 PM

Please Help! phpinclude_start gone...
 
I just upgraded to Beta4, and my PHP Includes Start has disappeared. This section housed my PHP code that included my banner rotator.

I need the variable $banner to be evaulated as:
include("location/banner.php");

So, that in my header template, I can place the $banner variable and have it include my banner rotator.

Can someone please explain how to do this?

Thank you in advance!

Zachery 07-15-2005 01:19 PM

Yes it is!

Use the hook "global_start" isntead :)

Xenon 07-15-2005 03:20 PM

when will the devs bring that template back?

when you include different headers in different styles, it's not nice to have styleids hardcoded in the global hook.

phpinclude is needed!

ThePimp 07-15-2005 07:50 PM

Quote:

Originally Posted by Zachery
Yes it is!

Use the hook "global_start" isntead :)

Yes, I have read about that, but it doesn't seem to work.

I start a new plugin called "banner", hooked to global_start...
In that plugin, I put:
include("location/banner.php");

I have also tried:
$banner=include("location/banner.php");

Neither work when called as $banner in any of the pages. (The reason I'm asking for help.)

Thanks in advance.

merk 07-16-2005 02:00 AM

try using $GLOBALS['banner'].

Also, did your banner script use output buffering in phpinclude? You will still need to do that in global_start.

ThePimp 07-16-2005 08:22 AM

Quote:

Originally Posted by merk
try using $GLOBALS['banner'].

Also, did your banner script use output buffering in phpinclude? You will still need to do that in global_start.


I opened the header template and changed $banner to $GLOBALS['banner']... And get the following error:

The following error occurred when attempting to evaluate this template:

Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /web/www.mysite.com/html/includes/adminfunctions_template.php(3504) : eval()'d code on line 59

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.

Still looking for a solution for this, does anyone have a way to do this?

merk 07-16-2005 09:36 PM

Sorry.

$GLOBALS[banner].

ThePimp 07-17-2005 06:43 PM

Quote:

Originally Posted by merk
Sorry.

$GLOBALS[banner].

Hmm... Ok, I tried that and can get some sort of an output, but the "include" function doesn't seem to work.

$banner=include('file.php'); (Doesn't work, it just doesn't show up)

include('file.php'); (there is no variable to be called using this)

I've tried a few different ways, and can't seem to include a file with the Global_Start for some reason.

Any other suggestions? I'm using PHPAdsNew and outputting a PHP file for the rotation.

ThePimp 07-18-2005 09:49 PM

Anyone?

Link14716 07-18-2005 09:53 PM

PHP Code:

ob_start();
include(
"location/banner.php");
$banner ob_get_contents();
ob_end_clean(); 

Use $banner in your header template.


All times are GMT. The time now is 02:29 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.03177 seconds
  • Memory Usage 1,736KB
  • 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
  • (1)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete