Gossamer Forum
Home : Products : Links 2.0 : Customization :

I'm going to lose it here...

Quote Reply
I'm going to lose it here...
I am redesigning the layout of my site_html and I am using XSSI's to determine which browser the user has and includes a page top accordingly. This works on all of my other pages but for some reason, when I use it in Links, it give's me 3 error while processing directive messages. Here's what I'm using:

<!--#if expr="$HTTP_USER_AGENT != /MSIE/ && $HTTP_USER_AGENT = Mozilla\/4/" -->
<!--#include virtual="/dev/ns4t.shtml" -->

<!--#elif expr="$HTTP_USER_AGENT = /MSIE/ && $HTTP_USER_AGENT = /Mozilla\/4/" -->
<!--#include virtual="/dev/ie40t.shtml" -->

<!--#elif expr="$HTTP_USER_AGENT = /Mozilla/3/" -->
<!--#include virtual="/dev/b3t.shtml" -->
<!--#endif -->

(The spacing is a bit messed up 'cuz of the wrapping)

If anyone has any idea why it would work on some pages and not others, please let me know 'cuz this is driving me crazy. I'm using just a plain old include (without an if statement) in another area of the site_html.pl and it works fine. I tried uploading the site_html in ascii and binary and neither of 'em helped. All of the links files have the .shtml extension.

So if you have any ideas, please let me know.

Thanks a bunch.

------------------
Jason
Extreme mtb
http://extreme.nas.net
Quote Reply
Re: I'm going to lose it here... In reply to
I don't think those SSI if statements would work. You should be using Perl if statements such as:

if (($ENV(HTTP_USER_AGENT) !~ "MSIE") && ($ENV(HTTP_USER_AGENT) == "Mozilla\/4/"))
{ <!--#include virtual="/dev/ns4t.shtml" --> }
elsif ...

What do you think?


------------------
Bob Connors
bobsie@orphanage.com
www.orphanage.com/goodstuff/
goodstufflists.home.ml.org/



[This message has been edited by Bobsie (edited December 16, 1998).]
Quote Reply
Re: I'm going to lose it here... In reply to
I am using a different method of determining the browser type in cgi files, however this code is for non-cgi pages. I am using that code on other non-cgi areas of my site and it works fine -- for some reason, it just doesn't work when it is built from the site_html.pl

------------------
Jason
Extreme mtb
http://extreme.nas.net
Quote Reply
Re: I'm going to lose it here... In reply to
Try ftping a generated page so you can check what is being printed to the file. Make sure it is identical to what appears in your regular html pages. If it isn't, hopefully that should give you an idea of what the problem is.

Cheers,

Alex