The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Save CSS in files
Hey there,
the option to save CSS into files on the server outputs the following link to the CSS file: Code:
<link rel="stylesheet" type="text/css" href="clientscript/vbulletin_css/vbulletin_dfgfdgfdgfdgdfgr556464.css" /> ./ = (root) Portal ./forum/ = Forum Now, as long as I move inside the /forum/ the above link works fine, since the clientscript/vbulletin_css/ folder is located inside the /forum/ folder. However, when I navigate to our Portal (which is completely written by ourselves, no hacks etc.), the link to the css files doesnt work anymore, understandably. The link then should looks like this Code:
<link rel="stylesheet" type="text/css" href="forum/clientscript/vbulletin_css/vbulletin_dfgfdgfdgfdgdfgr556464.css" /> So now, how do I change the automatically generated link to the CSS file when I am outside the forum or in general? Hope, anything was understandable (I'm german ). Greetz |
#2
|
||||
|
||||
There are *lots* of ways to deal with something like this. One way would be mod vB to output an absolute URL for that link, then it would work everywhere. I'd probably do this. Another way, would be in your portal code, buffer the output to the browser then fix the link
PHP Code:
|
#3
|
||||
|
||||
Unfortunately, that didnt work for any reason, but a fellow administrator had a working solution.
- Create Plugin (Hook: global_complete): PHP Code:
Works just like a charm. Thanks spli. |
#4
|
||||
|
||||
Or you could just put this in your headinclude template.
HTML Code:
<base href="$vboptions[bburl]" />
|
#5
|
||||
|
||||
Which would break any other relative links you have on the page. Of course if there are no other relative links, that's a perfect solution. (And one that didn't cross my mind.)
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|