PDA

View Full Version : Custom vB pages - Please help


stuuu
08-15-2002, 09:34 AM
Ok.

Check this, I have these files.

audio.inc - has my custom code in
audio.php - has the following code in

<?php
error_reporting(7);
require("./global.php");
eval("dooutput(\"".gettemplate("audio")."\");");
?>

I made a template called audio with the $header bits in, and I used the phpinclude template to include my custom audio.inc

Everything works, except all $variables taken from the audio.inc are not processed. So I get links like $session[sessionhash] instead of the session id, and $bbtitle instead of the name of the site.

Any idea how to make it process the $variables?

Or is there a another way to do this?

GSHelpBoy
08-15-2002, 05:41 PM
Did you add a require() to the global.php file for audio.inc?

Dark_Wizard
08-15-2002, 06:45 PM
I would like to offer you a bit of advice...change audio.inc to audio.inc.php for security reasons. PHP can't parse inc files and anyone can view them if they know the file name as well as do nasty things to your db. ;)