• Post Reply Bookmark Topic Watch Topic
  • New Topic

UBB Code eye strain  RSS feed

 
Steve Lovelace
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see that using the UBB Code [CODE] tage is encouraged, but when it is used, I have trouble reading its output. Why is the font so small? - I can barely distinguish a brace from a parenthesis. Can't be to conserve space, or the tag wouldn't be so profligate with white space. My presbyopic eyeballs are much happier when posters DON'T use the CODE tag.
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my browser, with my configuration, the code is the same size as the message text. Looking at the HTML source, though, the code is in a block marked <font size="1" face="Verdana, Arial"> which may indeed be pretty small -- the "smallest" size the browser normally will display.
I use Mozilla, and I've got Edit|Preferences|Appearance|Fonts|Minimum Font Size set to 16 px; I've also got the default sizes for both proportional and monospace fonts set at 16 px. I've got a nice high-resolution screen, but no fonts are ever too small unless they're part of an image.
Of course, I always view Word documents at 150%, too.
(Marilyn changed the < to &lt;)
[ September 05, 2003: Message edited by: Marilyn de Queiroz ]
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Posts: 12135
255
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I used to have that problem on my Opera / Linux system, until I installed the Microsoft fonts (which Microsoft have made free for anyone to download the font pack from their web site). Once I installed the font pack, all the fonts came out to be a more useful size.
So I guess the question for Steve / Ernest (& Bert): do you have Verdana font installed on your computer?
And the question for the sherriffs: is there a more common block font (e.g. Courier?) that we could be using?
Regards, Andrew
[ September 06, 2003: Message edited by: Andrew Monkhouse ]
 
Marilyn de Queiroz
Sheriff
Posts: 9080
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The big difference in font sizes between regular text and text that is between CODE tags is normally visible only in IE. It is not easily manipulated. Changing it would involve a hack of the UBB code in Perl. This can be done by only one or two people here at Javaranch. Time is a big issue here -- the time it takes to find the code that controls it, the time it takes to change it, the time that we will continue to be using this particular version of the software. If we upgrade or switch to another software (like Jive for example) in the near future, the volunteer's efforts will have to be repeated or discarded.

Some things are controlled by the UBB control panel which is accessible to sheriffs. This is not one of those things.

You could go to InfoPop, who wrote the UBB software that we are using, and let them know that you find their implementation of the CODE tags to be faulty.
[ September 06, 2003: Message edited by: Marilyn de Queiroz ]
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The problem is that the [ code ] tags are implemented with < pre > tags which has a default small font:
<pre>
This is written using a pre tag
</pre>
I made a change to insert a font size of 2 after the < pre > tag. We will see how this works out:

[ September 06, 2003: Message edited by: Thomas Paul ]
 
Joe Pluta
Ranch Hand
Posts: 1376
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Thomas Paul:
I made a change to insert a font size of 2 after the < pre > tag. We will see how this works out:

MUCH nicer, Tom.
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This will not fix any existing posts. UBB apparently stores the posts already converted. If you edit an existing post then it will get the larger font size. New posts will also get the larger font size, of course.
 
Bert Bates
author
Sheriff
Posts: 8945
17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thomas Rocks !!!
 
Steve Lovelace
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks everybody for the explanations, and many thanks for the fix. My eyeballs be very happy now.
Java Ranch rocks!!!
[ September 06, 2003: Message edited by: Steve Lovelace ]
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Thomas!
 
Marilyn de Queiroz
Sheriff
Posts: 9080
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<pre>So did this fix the <pre> tag too?</pre>

Apparently not

Thomas, could we ask you to take a look at this too? Since you've already looked at the code ...

But only if you have the time.
[ September 07, 2003: Message edited by: Marilyn de Queiroz ]
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no UBB [ pre ] tag as far as I know!
[pre]Trying out pre tags[/pre]
 
Marilyn de Queiroz
Sheriff
Posts: 9080
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So it's UBB's interpretation of html tags that's the problem, eh?
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The program was taking the [ code ] tag and writing it out as a < pre > tag. The problem was Internet Explorer's interpretation of the < pre > tag. What I did was change the program so that when it found the [ code ] tag, it wrote it out as a < pre > < font size="2" > instead of just a < pre >. The prgram is only scanning for UBB codes so it would be a bigger change to get it to look for < pre > tags. Plus, HTML tags are turned off in most forums anyway.
 
Marilyn de Queiroz
Sheriff
Posts: 9080
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The "pre" tag seems to work ok with IE on the static pages, but I agree that it is much less important here in the saloon and can probably be safely ignored. Certainly it is not worth spending much time trying to change it.
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"The case of the ever increasing font size!!"
First I post some code using the code tags. The forum bumps up the size of the font for me. The size looks really good!
So then I edit it, and magically the system bumps up the already bumped up font . Gosh, now it is REALLY big. A second edit makes it HUGE.
To avoid that, every time I edit, I have to remember to deleted out that auto-added font tags.
Sort of annoying . . . . .
Any ideas?
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just noticed this problem myself. Unfortunately I think this makes the current solution worse than the previous implementation. (Speaking as someone who long ago adjusted the font sizes on my browser so that code comes out large enough to see.) For those who haven't noticed yet, here's the problem. This only works if you post in one of the forums that does not allow HTML (which is most of our forums, but not this one):
Start with some simple code:

Edit the post once, and if you don't remember to delete the new tags, you get:

Edit once more, and we get:

I think that the key here is that Thomas' fix inserts the <pre> tag into UBB's stored version of a post. Which means every time that stored version is updated, it gets re-inserted. There's probably a way to have the <pre> tag taken back out every time you edit, but that's going to be messy. I suspect that the best solution would be to move Tom's fix to a different section of the UBB code - namely, the part where a stored post is converted to HTML for display. That way, (a) the stored post wouldn't be affected, and (b) old posts will be rendered correctly too.
[ September 08, 2003: Message edited by: Jim Yingst ]
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!