php forum
php mysql forum
php mysql smarty
 
Page 1 of 2 1 2 >
Topic Options
#222601 - 08/19/02 06:04 PM </font color>
Dave_L_dup1 Offline
Addict

Registered: 04/23/02
Posts: 1929
Loc: Virginia, USA

   </font color> to Del.icio.us Add to del.icio.us
  Digg </font color> Digg it
The color markup tag translates its closing tag to </font color>. Is this standards-compliant?
_________________________
UBB.threads beta tester / threadsdev.com moderator
Software consulting services including UBB.threads problem resolution / installs / upgrades / customization.

Top
#222602 - 08/19/02 06:13 PM Re: </font color> [Re: joeuser]
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25434
Loc: Texas
I don't think so... would need to do a test page and check <img src="/forum/images/icons/smile.gif" alt="" /><br /><br />uno momento por favor
_________________________
- Allen wavey
- What Drives You?

Top
#222603 - 08/19/02 06:15 PM Re: </font color> [Re: SurfMinister]
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25434
Loc: Texas
No, it isn't:<br /><br />http://validator.w3.org/check?uri=http%3....0+Transitional<br /><br />needs to be plain </font>
_________________________
- Allen wavey
- What Drives You?

Top
#222604 - 08/19/02 06:19 PM Re: </font color> [Re: SurfMinister]
Dave_L_dup1 Offline
Addict

Registered: 04/23/02
Posts: 1929
Loc: Virginia, USA
So should that be considered a bug?
_________________________
UBB.threads beta tester / threadsdev.com moderator
Software consulting services including UBB.threads problem resolution / installs / upgrades / customization.

Top
#222605 - 08/19/02 06:21 PM Re: </font color> [Re: joeuser]
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25434
Loc: Texas
technically yes, as the current closing tag really isn't compliant to any html standard <img src="/forum/images/icons/wink.gif" alt="" />
_________________________
- Allen wavey
- What Drives You?

Top
#222606 - 08/19/02 06:33 PM Re: </font color> [Re: SurfMinister]
Dave_L_dup1 Offline
Addict

Registered: 04/23/02
Posts: 1929
Loc: Virginia, USA
Thanks <img src="/forum/images/icons/smile.gif" alt="" />
_________________________
UBB.threads beta tester / threadsdev.com moderator
Software consulting services including UBB.threads problem resolution / installs / upgrades / customization.

Top
#222607 - 08/19/02 06:38 PM Re: </font color> [Re: joeuser]
JustDave Offline
That 70's Guy

Registered: 06/24/01
Posts: 4097
<blockquote><font class="small">posted by Dave_L:</font><hr /> So should that be considered a bug? <hr /></blockquote><br /><br /><br />Actually that's a "designed flaw"... lol This was the way Rick was able to deal with the new color markup code.<br /><br />Perhaps one can still simply replace the </font color> tags with </font> tags before displaying so that they are compliant?
_________________________
~Dave
ChattersOnline.com

Top
#222608 - 08/19/02 06:44 PM Re: </font color> [Re: sjsaunders]
Dave_L_dup1 Offline
Addict

Registered: 04/23/02
Posts: 1929
Loc: Virginia, USA
That sounds like it would work, except that the translation would have to be done every time a post is displayed, which seems inefficient.<br /><br />A couple of other choices:<br /><br />Use the method employed by UBB.classic, where the opening and closing tags are translated with a single regex.<br /><br />Use <!--color--></font> in place of </font color>. I haven't thought this through, so I'm not sure if it would work.
_________________________
UBB.threads beta tester / threadsdev.com moderator
Software consulting services including UBB.threads problem resolution / installs / upgrades / customization.

Top
#222609 - 08/19/02 06:46 PM Re: </font color> [Re: sjsaunders]
Gardener Offline
Addict

Registered: 05/11/99
Posts: 1956
Loc: Sweden, Uppsala
[]<br />Actually that's a "designed flaw"... lol This was the way Rick was able to deal with the new color markup code.<br /><br />Perhaps one can still simply replace the </font color> tags with </font> tags before displaying so that they are compliant? <hr /></blockquote><br /><br />Yes, it should be possible. I've been thinking of adding this to the markuphack since there are even more tags that aren't really xhtml compliant in the same way.
_________________________
/Gardener | Complete list of my mods

Top
#222610 - 08/19/02 06:50 PM Re: </font color> [Re: c0bra]
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25434
Loc: Texas
why wouldn't a plain </font> work? You are only closing the opening <font color= tag
_________________________
- Allen wavey
- What Drives You?

Top
#222611 - 08/19/02 06:56 PM Re: </font color> [Re: joeuser]
Gardener Offline
Addict

Registered: 05/11/99
Posts: 1956
Loc: Sweden, Uppsala
That sounds like a better idea to have the html comment in front of the closing font tag, and I don't see why it shouldn't work.
_________________________
/Gardener | Complete list of my mods

Top
#222612 - 08/19/02 06:58 PM Re: </font color> [Re: SurfMinister]
Dave_L_dup1 Offline
Addict

Registered: 04/23/02
Posts: 1929
Loc: Virginia, USA
I don't think that would work, because there may be other </font> tags that don't correspond to the color markups. (Unless the UBB.classic method were used.)
_________________________
UBB.threads beta tester / threadsdev.com moderator
Software consulting services including UBB.threads problem resolution / installs / upgrades / customization.

Top
#222613 - 08/19/02 07:00 PM Re: </font color> [Re: SurfMinister]
Gardener Offline
Addict

Registered: 05/11/99
Posts: 1956
Loc: Sweden, Uppsala
Other markup tags also have the </font> tag so the undo_markup function won't be able to distinguish which one is used for the color tag.
_________________________
/Gardener | Complete list of my mods

Top
#222614 - 08/21/02 03:53 AM Re: </font color> [Re: c0bra]
mod_perl Offline
Newbie

Registered: 08/15/02
Posts: 16
<blockquote><font class="small">posted by Gardener:</font><hr /> Other markup tags also have the </font> tag so the undo_markup function won't be able to distinguish which one is used for the color tag.<hr /></blockquote> <br /> <br />undo_markup could easily tell which closing font tags are used for color tags because they are the ones that follow a font tag with a <br />color attribute. I haven't seen the latest markup code but this is the way to do it (with perl): <br /> <br /><pre><font class="small">code:</font><hr> <br />$Body =~ s/\[$lang{'COLOR_RED'}\](.*?)\[\/$lang{'COLOR_RED'}\]/<font color=red>$1<\/font>/ig; # do <br />$Body =~ s/<font color=red>(.*?)<\/font>/\[$lang{'COLOR_RED'}\]$1\[\/$lang{'COLOR_RED'}\]/ig; # undo <br /></pre><hr> <br />

Top
#222615 - 08/21/02 09:22 AM Re: </font color> [Re: jjski]
Gardener Offline
Addict

Registered: 05/11/99
Posts: 1956
Loc: Sweden, Uppsala
Won't work.<br /><br />Well, it will, but start nesting tags and it will break. That's the reason the start and end font tag is replaced separately and the reason that the </font> has the extra info so that it differs from other </font> tags.
_________________________
/Gardener | Complete list of my mods

Top
#222616 - 08/21/02 10:21 AM Re: </font color> [Re: c0bra]
Dave_L_dup1 Offline
Addict

Registered: 04/23/02
Posts: 1929
Loc: Virginia, USA
Actually, mod_perl's post describes the method used by UBB.classic that I referred to earlier. Nested tags are handled properly if you loop over the regex replacement operations. Each loop iteration handles one layer of nesting.
_________________________
UBB.threads beta tester / threadsdev.com moderator
Software consulting services including UBB.threads problem resolution / installs / upgrades / customization.

Top
#222617 - 08/21/02 10:52 AM Re: </font color> [Re: joeuser]
Gardener Offline
Addict

Registered: 05/11/99
Posts: 1956
Loc: Sweden, Uppsala
Granted, with added code, the code would work. =] Sort of, at least. There would still be problems with extra tags inside the color tag that would also use the </font> right? Because that would match first.
_________________________
/Gardener | Complete list of my mods

Top
#222618 - 08/21/02 11:01 AM Re: </font color> [Re: c0bra]
Dave_L_dup1 Offline
Addict

Registered: 04/23/02
Posts: 1929
Loc: Virginia, USA
I'm not sure what you mean. Could you provide an example?
_________________________
UBB.threads beta tester / threadsdev.com moderator
Software consulting services including UBB.threads problem resolution / installs / upgrades / customization.

Top
#222619 - 08/21/02 11:41 AM Re: </font color> [Re: joeuser]
Gardener Offline
Addict

Registered: 05/11/99
Posts: 1956
Loc: Sweden, Uppsala
More tags than the color-tag could generate the &lt;/font&gt; end tag, and when parsing the color tag those tags would match as well.<br /><br />If these tags were used:<br />[font:courier] [color:red] [size:5] Red courier, size 5 [/size] [/color] [/font]<br /><br />And it would create the following html:<br />&lt;font style="courier"&gt;&lt;font color="red"&gt;&lt;font size="5"&gt; Red courier, size 5 &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;<br /><br />Then the regexp would parse the code like this:<br />[font:courier][color:red][size:5] Red courier, size 5 [/font][/color][/size]<br /><br />Because the regex would match the first occurance of &lt;/font&gt;. In the above example, the tags are just nested wrong, but it could match other code which would break things even worse. Like &lt;/font&gt; which is inside the quote-tag if I'm not mistaken.
_________________________
/Gardener | Complete list of my mods

Top
#222620 - 08/21/02 12:24 PM Re: </font color> [Re: c0bra]
Dave_L_dup1 Offline
Addict

Registered: 04/23/02
Posts: 1929
Loc: Virginia, USA
That wouldn't happen.<br /><br />The code I use in my font hack for UBB.classic looks like this:<br /><br />my $match = 1;<br />while($match != 0) {<br /> $match = 0;<br /> $match++ if $text =~ s~(<font (.+?)>)(.+?)(</font>)~\[font $2\]$3\[/font\]~is;<br />}<br /><br />Here's how it works:<br /><br />Initially: <font style="courier"><font color="red"><font size="5"> Red courier, size 5 </font></font></font><br /><br />After iteration 1: <font style="courier"><font color="red">[font size="5"] Red courier, size 5 [/font]</font></font><br /><br />After iteration 2: <font style="courier">[font color="red"][font size="5"] Red courier, size 5 [/font][/font]</font><br /><br />After iteration 3: [font style="courier"][font color="red"][font size="5"] Red courier, size 5 [/font][/font][/font]
_________________________
UBB.threads beta tester / threadsdev.com moderator
Software consulting services including UBB.threads problem resolution / installs / upgrades / customization.

Top
Page 1 of 2 1 2 >


Who's Online
1 Registered (Gizmo), 26 Guests and 11 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Team UBBDev Rides Again!
by AllenAyres
10/13/08 01:36 PM
Blogs, love em or hate em?
by AllenAyres
10/07/08 02:05 PM
What do you use to edit the files
by Ian_W
10/05/08 03:33 PM
BeyondCompare v3.00
by Ian_W
10/05/08 03:32 PM
Glossy Black Theme with Image Reflection
by Gizmo
10/05/08 02:17 PM
ShareThis
by Gizmo
09/28/08 05:06 AM
[7.3] Viewing MySQL logfiles made easier
by AllenAyres
09/27/08 09:57 PM
New Mods
[7.3] Viewing MySQL logfiles made easier
by blaaskaak
09/24/08 05:39 PM
[7.3.1] add search to showmembers page
by blaaskaak
09/07/08 04:50 AM
Newest Members
Kevs, pisa666, ghengis317, NitroX, Dogan
13346 Registered Users
Top Posters Last 30 Days
AllenAyres 11
blaaskaak 6
Ian_W 4
tackaberry 4
Chris Bale 4
Gizmo 4
FREAK1 4

 

 

 
fusionbb message board php hacks