vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Why won't external vbulletin pages do this? (https://vborg.vbsupport.ru/showthread.php?t=82073)

JohnBee 05-26-2005 03:52 PM

Why won't external vbulletin pages do this?
 
I just wanted to know why we are not able to do

<?php
include ("bottom.php");include ("whatever.php");
?>

on external bBulletin pages that use the

eval('print_output("' . fetch_template('TEMPLATE_XXX') . '");');

I know we can put the php include in the php include template
and it works from there but I am using a news sscript that cannot
work from the templates because it carries a newsid variable from
a cgi script to open a static page.

So I was wondering, is there any way to do a php includes from
a .php file after pulling forum data from a template?

I have tried over and over all I get are blank white pages the moment
I put an eval('print_output( function in the page.

very frustrating :(

MoT3rror 08-15-2007 07:13 PM

What you would have to do is tell php to change to the forums directory to get the globals file i take is what your after. an example is.




PHP Code:

chdir('path/to/your/forums'); 
require_once(
'path/to/your/forums/file.php'); 


Eikinskjaldi 08-15-2007 08:24 PM

Quote:

Originally Posted by JohnBee (Post 658608)
I just wanted to know why we are not able to do

<?php
include ("bottom.php");include ("whatever.php");
?>

on external bBulletin pages that use the

eval('print_output("' . fetch_template('TEMPLATE_XXX') . '");');

I know we can put the php include in the php include template
and it works from there but I am using a news sscript that cannot
work from the templates because it carries a newsid variable from
a cgi script to open a static page.

So I was wondering, is there any way to do a php includes from
a .php file after pulling forum data from a template?

I have tried over and over all I get are blank white pages the moment
I put an eval('print_output( function in the page.

very frustrating :(

Once you have done an eval(print_output thats the end of the story for that script.

1) Why do you need to do the includes after the val
2) if its a blank page (which usually means the template is stuffed) why are you eval'ing at all
3) you can eval without print_output, store the template in a variable
4) what makes you think the news thing wont work from a template

Opserty 08-15-2007 08:51 PM

Quote:

print_output (line 4692)

Finishes off the current page (using templates), prints it out to the browser and halts execution
void print_output (string $vartext, [boolean $sendheader = true])

* string $vartext: The HTML of the page to be printed
* boolean $sendheader: Send the content length header?
http://members.vbulletin.com/api/vBu...onprint_output


All times are GMT. The time now is 11:16 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.00929 seconds
  • Memory Usage 1,724KB
  • 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
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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