Log in

View Full Version : Why won't external vbulletin pages do this?


JohnBee
05-26-2005, 03:52 PM
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.




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

Eikinskjaldi
08-15-2007, 08:24 PM
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
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/vBulletin/_includes_functions_php.html#functionprint_output