PDA

View Full Version : News hack IN a vB Template?


Ian Cunningham
02-25-2002, 04:14 PM
I've create a new page called "news.php" where I want to stick some news from the pluhnews hack, and it has the following code:


<?php
require("./global.php");

eval("\$header = \"".gettemplate("header",1,0)."\";");
eval("\$footer = \"".gettemplate("footer",1,0)."\";");

$news =
eval("dooutput(\"".gettemplate("News")."\");");
?>

?>


In the custom "News" template I use $news to call the news.php file via the phpincludes template :


$news = implode('',file('pluhnews.php'));


BUT... when I load News.php, it includes the pluhnews.php file, but just as text - i.e all the code is parsed as text!!!

Am I doing something majorly wrong!?

Ian Cunningham
02-27-2002, 03:13 PM
Anyone?

If someone knew how I could include a PHP file into the template, and still get it parsed, that would be great :)