The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Can't make navbar links point to correct location
I'm working on a vBulletin site that is located in a folder called "forum" & I have created a test page like this:
www.domain.com/forum/test/test.php test.php works as expected when located in the forum folder. However, I want to make it work from the forum/test/ folder. I have the following code: Code:
// ####################### SET PHP ENVIRONMENT ########################### error_reporting(E_ALL & ~E_NOTICE); // #################### DEFINE IMPORTANT CONSTANTS ####################### define('NO_REGISTER_GLOBALS', 1); define('THIS_SCRIPT', 'test'); // change this depending on your filename // ################### PRE-CACHE TEMPLATES AND DATA ###################### $phrasegroups = array('user', 'timezone', 'posting', 'cprofilefield', 'cppermission'); // pre-cache templates used by all actions $globaltemplates = array( 'GENERIC_SHELL', 'navbar', ); // ######################### REQUIRE BACK-END ############################ chdir('../'); require_once('./global.php'); require_once(DIR . '/includes/functions_user.php'); // ####################################################################### // ######################## START MAIN SCRIPT ############################ // ####################################################################### $out = 'Test.'; // Output page: $navbits = array(); $navbits[$parent] = 'Test'; $navbits = construct_navbits($navbits); eval('$navbar = "' . fetch_template('navbar') . '";'); eval('$HTML = "' . fetch_template('test') . '";'); eval('print_output("' . fetch_template('GENERIC_SHELL') . '");'); Code:
<h3>$out</h3> I've tried all sorts of things in the code. I've checked against other php files & 3rd party applications but I'm now stumped as to what to try next. Does anyone have any ideas on how I can make the navbar work correctly? TIA for any advice / ideas? |
#2
|
||||
|
||||
Use a HTML base element (at the top of headinclude).
HTML Code:
<base href="http://www.domain.com/forum/" />
|
#3
|
|||
|
|||
Thanks, it worked but made all the buttons in the navbar disappear!
Something in your wording made me add a full-stop: $headinclude .= '<base href="http://www.domain.com/forum/" />'; I guess headinclude is set in global.php or userfunctions.php. Anyway, I'm blathering - it's all working now - Thanks very much for your help yet again :-) |
#4
|
||||
|
||||
Just edit the template "headinclude". You need to add it to the top, because there is Javascript in there that have relative references.
|
#5
|
|||
|
|||
Ah, I see - thanks for that.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|