Log in

View Full Version : If clause for a template??


pgowder
08-30-2005, 12:59 PM
I saw this code here on vBulletin.org:

if (THIS_SCRIPT != 'arcade')
{
<insert content of template here>
}
And it is supposed to go in the phpinclude_start.

I've tried this, but it doesn't appear to work. Here is my whole code:

// Example of how to include a seperate file:
// ob_start();
// require("yourheader.html");
// $header = ob_get_contents();
// ob_end_clean();

if (THIS_SCRIPT != 'arcade')
{
ob_start();
require("gathering_menu.inc");
$gathering_menu = ob_get_contents();
ob_clean();

ob_start();
require("header_arcade.inc");
$header = ob_get_contents();
ob_clean();

ob_start();
require("footer_arcade.inc");
$footer = ob_get_contents();
ob_clean();

ob_start();
require("../options.inc");
$options = ob_get_contents();
ob_clean();

ob_start();
require("skyad_arcade.inc");
$skyad= ob_get_contents();
ob_end_clean();

}

ob_start();
require("gathering_menu.inc");
$gathering_menu = ob_get_contents();
ob_clean();

ob_start();
require("header.inc");
$header = ob_get_contents();
ob_clean();

ob_start();
require("footer.inc");
$footer = ob_get_contents();
ob_clean();

ob_start();
require("../options.inc");
$options = ob_get_contents();
ob_clean();

ob_start();
require("skyad.inc");
$skyad= ob_get_contents();
ob_end_clean();


$fileusername = "$bbuserinfo[username]";
$fileemail = "$bbuserinfo[email]";
$fileuserid = "$bbuserinfo[userid]";
Thanks!!

The problem is that the arcade doesn't work with my phpadsnew local php code, so I'm need to switch out those includes to have different phpadsnew code.

Thanks

merk
08-31-2005, 01:57 AM
phpinclude templates are not in 3.5

You should look at using global_start hooks instead.

pgowder
08-31-2005, 01:40 PM
phpinclude templates are not in 3.5

You should look at using global_start hooks instead.
Where do I find info about those?

Will those work in 3.0x?