PDA

View Full Version : navbar Breaks with Application in Subdirectory


bynon
10-14-2009, 05:06 PM
Hello All,

I am coding my first application for vB; an article content syndication Plugin. I have most of the application working well enough for Beta testing except for two issues that I could use some guidance on.

The first problem occurred when I moved my application files into a sub-directory from the forum root. When I did this, all of the navbar links take the path of the application directory. Can anyone tell me how to prevent this without modifying the navbar template?

The second issue I need to resolve has to do with the header bits. In order to make my application work properly, I need control over the html meta data. This is easily accommodated for everything except the main forum CSS file, which is rewritten with each update. Is there a variable I can use that is always updated with the name of the current vB CSS file?

Thanks in advance. I appreciate any and all help.

~ David

Lynne
10-14-2009, 08:33 PM
Use <base url="url to directory"> in your <head> (google it if you don't know what it does or how to use it)

Aren't you using vbulletin's templates for the page? If so, and you include the headinclude template, you will get the css file also.

bynon
10-14-2009, 09:57 PM
Use <base url="url to directory"> in your <head> (google it if you don't know what it does or how to use it)

Aren't you using vbulletin's templates for the page? If so, and you include the headinclude template, you will get the css file also.

Hi Lynne,

Brilliant!!! Thank you for your help. It was just what I needed to jog the gray matter.

Yes, sure enough, adding <base href="$vbpoptions[bburl]/" /> to the template head did the trick for problem one.

The solution to problem two was staring me in the face inside the headinclude template:

$style[css] -- is the include for VB's main CSS file.

I can't use the headinclude template as is because the meta data is for the syndication content is unknown to VB. It is passed to my Plugin's template via XML from my content syndication server.

Thanks again!

~David