Hey Guys,
I'm working on a client's site and he wants to have
http://forums.tunedtech.ca/advertise/ so he can add content for Advertising Plans, etc. Now since that page is outside vBulletin's Forum Root I had to change the "REQUIRE BACK-END" part of the code to point to it, no problem. Everything is working and showing up, but it's not loading the CSS from vBulletin on there. Take a look ...
http://forums.tunedtech.ca/advertise/ (Does not show vBulletin CSS as it should)
I went ahead and created the page using "custom_" in front of the Template name, so that I could access it via the "misc.php" link as well. This helps, so that I know what the page is suppose to look like. Anyways, please take a look
here and compare to see what I mean. That's how its suppose to look like when I visit
http://forums.tunedtech.ca/advertise/ but it does not.
I'm thinking its due to it being outside the vBulletin Forum Root. So what should I add or change to make it work? Any help would be greatly appreciated.
Thanks in advanced,
Danny
My PHP Code:
PHP Code:
<?php
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE & ~8192);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'index'); // change this depending on your filename
// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array(
);
// get special data templates from the datastore
$specialtemplates = array(
);
// pre-cache templates used by all actions
$globaltemplates = array(
'custom_Advertise',
);
// pre-cache templates used by specific actions
$actiontemplates = array(
);
// ######################### REQUIRE BACK-END ############################
chdir('../../forums/');
require_once('./global.php');
// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################
$navbits = array();
$navbits[$parent] = 'Advertise on tunedTECH';
$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('custom_Advertise') . '");');
?>
My Tempate Code:
Code:
$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<title>$vboptions[bbtitle]</title>
$headinclude
</head>
<body>
$header
$navbar
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="tcat">Title</td>
</tr>
<tr>
<td class="alt1">Text</td>
</tr>
</table>
$footer
</body>
</html>
EDIT:
Found the fix, much thanks to
SirAdrian! If you are also experiencing this issue take a look here for the solution:
https://vborg.vbsupport.ru/showpost....postcount=1074 ... Add that code to the Template you created right before the "$headerinclude" line withing the <head> tags ... Enjoy!