Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 07-15-2005, 02:04 PM
ThePimp's Avatar
ThePimp ThePimp is offline
 
Join Date: Feb 2005
Posts: 329
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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!
Reply With Quote
  #2  
Old 07-15-2005, 02:19 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes it is!

Use the hook "global_start" isntead
Reply With Quote
  #3  
Old 07-15-2005, 04:20 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
  #4  
Old 07-15-2005, 08:50 PM
ThePimp's Avatar
ThePimp ThePimp is offline
 
Join Date: Feb 2005
Posts: 329
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #5  
Old 07-16-2005, 03:00 AM
merk merk is offline
 
Join Date: Nov 2001
Location: Canberra, Australia
Posts: 601
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

try using $GLOBALS['banner'].

Also, did your banner script use output buffering in phpinclude? You will still need to do that in global_start.
Reply With Quote
  #6  
Old 07-16-2005, 09:22 AM
ThePimp's Avatar
ThePimp ThePimp is offline
 
Join Date: Feb 2005
Posts: 329
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #7  
Old 07-16-2005, 10:36 PM
merk merk is offline
 
Join Date: Nov 2001
Location: Canberra, Australia
Posts: 601
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry.

$GLOBALS[banner].
Reply With Quote
  #8  
Old 07-17-2005, 07:43 PM
ThePimp's Avatar
ThePimp ThePimp is offline
 
Join Date: Feb 2005
Posts: 329
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #9  
Old 07-18-2005, 10:49 PM
ThePimp's Avatar
ThePimp ThePimp is offline
 
Join Date: Feb 2005
Posts: 329
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone?
Reply With Quote
  #10  
Old 07-18-2005, 10:53 PM
Link14716's Avatar
Link14716 Link14716 is offline
 
Join Date: Jun 2002
Location: Georgia, USA
Posts: 2,519
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PHP Code:
ob_start();
include(
"location/banner.php");
$banner ob_get_contents();
ob_end_clean(); 
Use $banner in your header template.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:23 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06607 seconds
  • Memory Usage 2,248KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete