The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Chdir/$vbulletin->options['homeurl'] trouble.
Im trying to make a frontpage for my website that uses elements like the navbar, header, headerinclude and footer. The file layout is
/index.php -- /forum I've got it sort of working but the problem is my navbar links are going to /root when they should be redirected to /forum/... Heres the page that I'm talking about: http://www.study-medicine.co.uk/index.php I'm using this code in my php to change directory: Code:
$cwd = getcwd(); chdir('/kunden/homepages/44/d254237426/htdocs/forum'); require_once('global.php'); chdir($cwd); Code:
$vbulletin->options['homeurl'] So its not converting that homeurl into the homeurl. Its probably quite apparent my knowledge of php is on the slim side, really struggling to see what the next step is here. Thanks for your help, much appreciated. Been working on this for the last 12 hours solid. --------------- Added [DATE]1220367731[/DATE] at [TIME]1220367731[/TIME] --------------- I notice the page is also showing the "Loaded but with errors" icon in the bottom left of IE7. |
#2
|
|||
|
|||
Does your script require you the chdir() back to the original directory? If not try leaving the script with the forumhome as current directory.
|
#3
|
||||
|
||||
I have a similar setup - an index.php page and then a forum directory. Unfortunatley, my way of dealing with this was to modify the navbar and add "$vboptions[bburl]/" in front of every link. I also had to modify the headerinclude in a similar way. I also made a new footer template without the $cron image just to use on that index.php page. I'm sure there must be a better way, but that's how I did it way back on 3.0 and I haven't changed my basic method.
|
#4
|
|||
|
|||
Yeah, it requires it.
|
#5
|
|||
|
|||
Then you will need to ensure your templates use absolute URLs.
|
#6
|
|||
|
|||
I've changed them now to include the /forum/ prefix which seems to be working. Thanks for your help. Its a shame really there isn't a more inbuilt function for this as its a very common setup.
|
#7
|
||||
|
||||
You can just add a base element to the top of headinclude, no need to do all that link editing.
HTML Code:
<base href="http://www.yoursite.com/forum/" />
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|