PDA

View Full Version : php newbie - please help.


MikeWarner
11 Feb 2002, 18:48
I am trying to add an non vbulletin page into a vBulletin template. I really am extremely new to php, but this is what I have so far:
<?php
require( "global.php" );

eval("dooutput(\"".gettemplate('headinclude')."\");");

eval("dooutput(\"".gettemplate('header')."\");");

include ("mignews3.php");

eval("dooutput(\"".gettemplate('footer')."\");");

?>
It does not works as it can't get past the first eval line. So far all it does is includes the "headinclude" template and then stops.

Please help - thanks.

MikeWarner
13 Feb 2002, 08:25
Anyone? i am trying to integrate a hack I've done, but I'm not saying what till it is done. Please help.

Chen
13 Feb 2002, 08:53
That's because after you doOutPut() the script exits (in vBulletin dooutput() is only used at the end of every file, to echo the page and stop).

You also don't need to get the header, headinclude and footer templates because that is done by default in global.php.

Try using this (not tested):
<?php
error_reporting(7);
require('./global.php');

echo dovars($headinclude);
echo dovars($header);
include ("mignews3.php");
echo dovars($footer);

?>

MikeWarner
13 Feb 2002, 17:34
I tried, but it gives me a blank page :(