Shoutbox

[code][/code] - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: General (/forumdisplay.php?fid=11)
+---- Forum: Forum & Website (/forumdisplay.php?fid=13)
+----- Thread: [code][/code] (/showthread.php?tid=87447)

[code][/code] by matty on 11-24-2008 at 02:02 PM

How come after posting the code blocks aren't properly formatted until the page is refreshed? This happens both at home and work. Firefox 3.

And DZ please add syntax highlighting already!


RE: [code][/code] by Mike on 11-24-2008 at 02:06 PM

code:
this is a test

Huh?
Works fine here (Firefox 2) :S
RE: [code][/code] by vaccination on 11-24-2008 at 02:16 PM

quote:
Originally posted by Mike
code:
this is a test

Huh?
Works fine here (Firefox 2) :S
Kinda pointless post, how about trying Firefox 3?

code:
woo


Works for me.
RE: [code][/code] by Felu on 11-24-2008 at 02:29 PM

Works fine here too. FF 3.04


RE: [code][/code] by matty on 11-24-2008 at 03:06 PM

I had to refresh the page before it showed up properly formated otherwise it looked just like the rest of the page :S

[Image: attachment.php?pid=938578]


RE: [code][/code] by Mike on 11-24-2008 at 03:10 PM

quote:
Originally posted by vaccination
Kinda pointless post, how about trying Firefox 3?
Too lazy to install it :P


matty, could it be any extension?
RE: [code][/code] by matty on 11-24-2008 at 03:12 PM

quote:
Originally posted by Mike
quote:
Originally posted by vaccination
Kinda pointless post, how about trying Firefox 3?
Too lazy to install it :P


matty, could it be any extension?
I have the glasser, hide menu bar, ietab, hide tab bar and tabmixplus

So no.
RE: [code][/code] by Basilis on 11-24-2008 at 03:46 PM

code:
test

I have noticed the same thing with matty a few times. Then I refresh and everything is fine.
RE: [code][/code] by haydos on 11-24-2008 at 04:52 PM

First time I opened this thread, Mike's post showed up with correct formatting. Basilis' post showed up with incorrect formatting.

I refreshed once and they both failed to have correct formatting.

I refresh again and it's back to how it showed the first time.

FX 3.0.4

Good luck WDZ :chrongue:


RE: [code][/code] by Chris4 on 11-24-2008 at 06:35 PM

It's all fine for me :P

FX 3.0.4


RE: [code][/code] by Matti on 11-24-2008 at 07:03 PM

I'm having the exact same thing. The font family isn't set properly until I refresh the page.

I think this has something to do with the CSS, I'll let Firebug have a look what's going on. :)

Firefox 3.0.4 on Vista Ultimate x64 SP1


Okay, think I found it. A post's content is embedded in a FONT tag like this:
code:
<td class="trow1" width="85%" style="vertical-align:top;">
<table width="100%"><tr><td>
<span class="smalltext"><b>Post title goes here</b><br /><br /></span>
<font size="2" face="verdana,tahoma,arial,helvetica">Post goes here</font></td></tr></table>
</td>
Now, everyone should know by now that you should never use deprecated HTML tags such as FONT when you have a much more reliable formatting system called CSS. The problem here is that code blocks are formatted like this:
code:
<blockquote class="code_body"><span class="smalltext">code:</span><hr size="1" color="#000000" /><br />
woo<br />
<hr size="1" color="#000000" /></blockquote><br />
The "code_body" class is defined as followed:
code:
.code_body { font-family: monospace; }
which basically tells the renderer to use the mono-space font as specified in the browser's preferences. The problem lies at two points:
  • The use of FONT. Don't use it. Never. It's evil. Place the whole post body in a DIV and give it a class like "post_body" which sets the font family right.
  • The specificity of the CSS selectors. The CSS definition of .code_body has a specificity of 1, which is way too low and will easily be overwritten by the FONT tag if not used properly. Get some more specificity! Use things like:
    code:
    table tr td .code_body
       or
    .post_body .code_body
We really need an upgrade to a newer version of MyBB and get those templates rewritten. They're coded in an age where HTML completely defined the design of a web page and CSS wasn't mainstream yet.

* Matti looks at WDZ... :dodgy:
RE: [code][/code] by Lou on 11-25-2008 at 01:59 AM

Syntax highlighting, provided by -dt-

http://random.thedt.net/forumhighlightdemo/

(Requires greasemonkey with firefox)


RE: [code][/code] by WDZ on 11-25-2008 at 06:50 AM

quote:
Originally posted by Matti
Now, everyone should know by now that you should never use deprecated HTML tags such as FONT when you have a much more reliable formatting system called CSS.
Shush, nobody needs to be told that... the original HTML for this board was written by a bunch of newbs 5 years ago. :p

I knew the font tag around the post body was dodgy, but I didn't know it was actually causing problems... thanks for figuring that out. I'll try fixing it tomorrow.

Strange how the bug is intermittent in Firefox and never happens in Opera or IE... :dodgy:
RE: [code][/code] by Jesus on 11-25-2008 at 02:23 PM

quote:
Originally posted by WDZ
Strange how the bug is intermittent in Firefox and never happens in Opera or IE...
to add to that, it seems to be only on Firefox 3.0.4
I upgraded yesterday from 3.0.3 and I didn't have the problem before that.
RE: [code][/code] by blessedguy on 11-25-2008 at 06:50 PM

Just wondering, wich one is the correct?
[Image: attachment.php?pid=938708]

code:
testing it with Firefox 3.0.3, by the way

RE: [code][/code] by WDZ on 11-26-2008 at 02:58 AM

ok, I got rid of that evil <font> tag. Let me know if you still see the bug... I haven't installed Firefox 3 yet. :p


RE: RE: [code][/code] by Naruto-SR on 11-26-2008 at 03:03 AM

quote:
Originally posted by WDZ
ok, I got rid of that evil <font> tag. Let me know if you still see the bug... I haven't installed Firefox 3 yet. :p

Why :|?

* Naruto-SR <3's WDZ.
RE: [code][/code] by NanaFreak on 11-26-2008 at 03:10 AM

code:
testing much??
...

edit: ok i think its fixed... it had the correct font and that when i first posted it...
RE: [code][/code] by Matti on 11-26-2008 at 04:19 PM

Looking good, WDZ! :D Thank you! :)


RE: [code][/code] by matty on 11-26-2008 at 04:53 PM

.fixed :P


RE: [code][/code] by Lou on 11-26-2008 at 11:01 PM

It's fixed but now it appears that all posts' content is moved up a little (i.e: Closer to the "RE: [code][/code]" line, in bold).


RE: [code][/code] by WDZ on 11-26-2008 at 11:41 PM

quote:
Originally posted by .Lou
It's fixed but now it appears that all posts' content is moved up a little (i.e: Closer to the "RE: [code][/code]" line, in bold).
How much closer? Does it look bad? :p

I took screenshots and measured the pixels to try to keep it the same, and it looks fine to me...

quote:
Originally posted by Naruto-SR
quote:
Originally posted by WDZ
I haven't installed Firefox 3 yet. :p
Why :|?
Because I use Opera. :p
RE: [code][/code] by prashker on 11-26-2008 at 11:48 PM

quote:
Originally posted by WDZ
Because I use Opera.

Is fluffy_lobster around?...no? Well then...

WDZ: stop being a jew
RE: [code][/code] by NanaFreak on 11-27-2008 at 12:12 AM

quote:
Originally posted by WDZ
How much closer? Does it look bad? :P
no, its fine... i didnt even see a difference ;o
RE: [code][/code] by Lou on 11-27-2008 at 12:46 AM

Seems fine now, how odd...


RE: [code][/code] by MeEtc on 11-27-2008 at 01:59 AM

Actually, to me there is less space between ALL lines of text, not just fro code and quote blocks. No, its not a problem, but just saying.

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut mollis elit. Curabitur at leo. Cras vestibulum erat eu erat. Mauris pede ligula, malesuada vel, adipiscing vitae, fringilla eget, lectus. Suspendisse potenti. Donec velit felis, adipiscing in, luctus nec, sodales vel, sem. Etiam congue tortor vitae purus. Suspendisse lobortis, purus ac interdum molestie, lacus dui condimentum nulla, et faucibus ante diam et nulla. In in orci eget pede porta rhoncus. Donec lacus. Etiam sed nibh.

quote:
Phasellus semper leo id purus. Morbi ultricies eros in turpis. Etiam enim arcu, vestibulum quis, interdum quis, fermentum in, purus. Nam vitae velit sed urna hendrerit posuere. Nulla erat nibh, tincidunt in, euismod id, vestibulum ut, tortor. Nam pellentesque. Quisque ac lacus a urna vehicula varius. Ut at tortor et mauris pretium lobortis. Nullam id augue eget sem mattis tempus. Sed accumsan sapien a magna. Morbi lacinia congue tellus. Praesent vitae tellus et velit pellentesque congue. In pulvinar tortor a felis. Integer urna.

RE: [code][/code] by WDZ on 11-27-2008 at 03:22 AM

quote:
Originally posted by MeEtc
Actually, to me there is less space between ALL lines of text, not just fro code and quote blocks. No, its not a problem, but just saying.
Huh... I think you're right. I don't know why replacing a <font> tag with a <div> and some basic CSS would cause that. :-/

Comparing the old spacing side-by-side with the current spacing, I prefer the old.

* WDZ tweaks the CSS a bit more
RE: RE: [code][/code] by Naruto-SR on 11-27-2008 at 03:54 AM

quote:
Originally posted by Naruto-SR
quote:
Originally posted by WDZ
I haven't installed Firefox 3 yet. :p
Why :|?
Because I use Opera. :p

Ewww!

I just done this in Paint for you.

[Image: foologfo4.png]

RE: [code][/code] by vaccination on 11-27-2008 at 09:10 AM

:banh:

---

Looks fine to me (Y)


RE: [code][/code] by Matti on 11-27-2008 at 05:52 PM

quote:
Originally posted by WDZ
Huh... I think you're right. I don't know why replacing a <font> tag with a <div> and some basic CSS would cause that. :-/

Comparing the old spacing side-by-side with the current spacing, I prefer the old.

* WDZ tweaks the CSS a bit more
I think it's because the old font size was 13px and the current one is only 12px. It looks okay when I change the font size to 13px through Firebug. :)
RE: [code][/code] by WDZ on 11-27-2008 at 08:44 PM

Yeah, for some reason I thought <font size=2> was equivalent to 12px. I fixed it last night, so you should be seeing 13px now unless you have an old copy of the stylesheet cached.