• Protip: Profile posts are public! Use Conversations to message other members privately. Everyone can see the content of a profile post.

Fix problem with Avatars and Netscape

BB

Experienced Member
Joined
15 August 2000
Messages
570
Location
Bellingham, WA
About 10% of the avatars on this site have spaces in the the file name. i.e.

<img src="http://www.nsxprime.com/ubb/avatars/custom/FAQ Nazi.gif">

According to the spec, URL's cannot contain spaces. Therefore, this is invalid HTML code.

IE replaces the spaces on the fly with %20 symbols. i.e.

<img src="http://www.nsxprime.com/ubb/avatars/custom/FAQ%20Nazi.gif">

Netscape however does not modify URL names. So effectively, only IE users can see FAQ Nazi's avatar. For Netscape users it comes up as a broken image.

The simple solution to this is to simply not use spaces in URL's since that's invalid anyway. Then NSXprime will be perfectly viewable by both IE and Netscape.

Since it appears I'm the only one who's complained so far, this is a sickening sign of how nearly everyone is using IE and Windows-- the McDonalds's of operating systems. In car terms, Windows is the equivalent of a Ford Escort.

Or a better analogy... Imagine if our choosen cars (NSX) were only drivable on 2% of the roads in this country and gas stations with "NSX compatible" gas were only available every 500 miles. Effectively, you'd have little choice but to buy that Ford Escort.

Lud, please fix this! You'll have my eternal gratitude. Thanks.


[This message has been edited by BB (edited 28 April 2001).]
 
Thanks for the note. I am aware of the problem and have it on my "to do" list.

The simple solution would indeed to be not to have spaces in the URLs, but that would mean nobody with a space in their user name could have an avatar, so I do not think that is a good solution.

Instead I am going to try and modify the code so it will convert spaces in user names to underscore characters when it looks for the associated file name, then change the spaces in the filenames to underscore characters. I just haven't had time to work on it lately.
 
Thanks Lud! BTW, I noticed the software already encodes usernames using a '+' character. i.e.

FAQ+Nazi

I didn't realize Ultimate Bulliten Board came with the source code so you can modify it. That's really cool.
 
Yes, it is distributed as perl. Avatars are not a built in feature of UBB, they are a "packaged" third party hack. By that I mean there is a text file showing you what to modify in each of the scripts to add the avatar feature.

If you are handy w/ perl (I am not, which is why I haven't fixed it yet - it will end up taking me a while) and want to take a whack at it, I'd be happy to send you the script files.
 
Sure, send me the relevant perl files and I'll try and fix it. It shouldn't be too difficult.



[This message has been edited by BB (edited 29 April 2001).]
 
The option SHOULD be to get Internet Explorer.

-- Chris

------------------
SoS_logo.gif

www.ScienceofSpeed.com - Click for more info
www.NSXClassifieds.com - The internet's only exclusive NSX Classified site!
 
Originally posted by ScienceofSpeed:
The option SHOULD be to get Internet Explorer.

Sorry Chris, I run Linux. IE is simply not available for Linux. Are you suggesting I pay money to switch to an operating system I don't like? That's like asking you to get rid of that NSX thing that nobody else drives and buy a real sports car like a Ford Mustang.

Understand that some of us are as passionate about computers as we are about our cars. I prefer Linux over Windows, just like I prefer an NSX over a Mustang. You may prefer Windows or maybe you don't really care about computer operaging systems-- that's cool.

Just please don't help to errode what the net is all about by promoting such a non-diverse environment. In the long run having a choice of operating systems and web browsers in the interest of all. To think otherwise is just silly.
 
BB - Since we are on the subject, did you get the files I e-mailed the other week?
 
Lud,

Yes, I got the files. I finally got off my butt today and took a look at them. Fortunetly the fix for Netscape is easy...

In ubb_library2.pl, search for:
$ThisAvatar = $thisprofile[15];
Add the following line right below it:
$ThisAvatar =~ s/ /%20/g;

In ubbmisc.cgi, search for:
$Avatar = $thisprofile[15];
Add the following line right below it:
$Avatar =~ s/ /%20/g;

This statement replaces all spaces in Avatar image URL's with %20. 20 is the ascii code (in hex) for a space. This is the exact same thing IE does with spaces in order to turn invalid URL's into valid ones.

BTW, Netscape 6.x and Mozilla appear to mimic IE's behavior on this matter. So this is only an issue for Netscape 4.x and older.
 
Back
Top