|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
I lack one thing of having the UBB forum files completely XHTML 1.0 transitional compliant - lists. And I've got most of that done except for getting this error :: "Error: text is not allowed here; try wrapping the text in a more descriptive container" when validating my test page here :: https://ubbdev.com/ubbcgi/ultimatebb.cgi?ubb=get_topic;f=5;t=000184 Any idea how we can handle this last little bit of code? I finished quotes, code, and most of lists, just don't know what text wrapper it wants for the li parts of lists. Get this one done and I can make that mhp and move the mod to finished status
|
|
|
|
Joined: Mar 2001
Posts: 7,394
Admin / Code Breaker
|
Admin / Code Breaker
Joined: Mar 2001
Posts: 7,394 |
Allen, I don't think needs a closing tag
Also, [code][/code] doesn't have its code font, I think I told you how to fix it a long time ago in a Chit Chat thread.
[ 12-10-2001 04:38 AM: Message edited by: LK ]
|
|
|
|
Joined: Sep 2000
Posts: 4,211
Master Hacker
|
Master Hacker
Joined: Sep 2000
Posts: 4,211 |
does need a closing tag. The way it works is that you do the unordered list , each list item - , some text, close the item tag
, and then close the list tag .
Allen, in the page you linked to, the closed itself, which isn't right, because it actually does have an end tag. You have
code:
when it should be
code: list item text
[ 12-10-2001 08:57 AM: Message edited by: Matt Jacob ]
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
that's probably what's breaking it... lemme look at it some more
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
LK, the text in code is handled a bit differently than before, there is no
|
|
|
|
Joined: Mar 2001
Posts: 7,394
Admin / Code Breaker
|
Admin / Code Breaker
Joined: Mar 2001
Posts: 7,394 |
Matt, http://validator.w3.org/check?uri=http%3A%2F%2Fwww.ubbdev.com%2Fubbcgi%2Fultimatebb.cgi%3Fubb%3Dget_topic%3Bf%3D5%3Bt%3D000184&charset=%28detect+automatically%29&doctype=Inline (ignore the errors, just the validation page itself) doesn't have in the end of every list item... ie. code: Line 505, column 35:
... </font><ul type="square"><li></li> this is a list<li></li> t ... ^
Error: text is not allowed here; try wrapping the text in a more descriptive container
Allen, [code] needs IMO, because otherwise it won't keep spaces/tabs.
|
|
|
|
Joined: Sep 2000
Posts: 4,211
Master Hacker
|
Master Hacker
Joined: Sep 2000
Posts: 4,211 |
LK, I'm not sure I understand what you're saying. On line 505, the list isn't being done properly. Allen, for the list, each separate list item needs to be enclosed with the tags. Having the text and then is to go around in a circle, but if I understand correctly, that's what we're trying to fix here?
|
|
|
|
Joined: Mar 2001
Posts: 7,394
Admin / Code Breaker
|
Admin / Code Breaker
Joined: Mar 2001
Posts: 7,394 |
Matt, not the error, I mean validator.w3.org ITSELF
They also have a list, but they don't have
My example had in the beginning but nothing in the end.
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
yes, you are both correct LK, I added the pre to code and it's ok. Lists aren't validating because I don't know what I am doing... I need the text on each list line inside and the line in ubb_lib for lists is now back to: $_[0] =~ s/n?r?([*])/ /isg;
and the line in lib_posting for when you wanna edit is now back to:
$_[0] =~ s//[*]/isg;
which works fine, but doesn't close each line's text properly to validate.
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
would font tags closing before and opening after each li improve that? And I think MJ's point is that every tag must be closed in its proper nesting to validate.
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
I see what you mean about w3's validation page... it doesn't close the li tags either, but they only validate to html 4.01 - talk about loo-hoo-hoo-zers...
|
|
|
|
Joined: Sep 2000
Posts: 4,211
Master Hacker
|
Master Hacker
Joined: Sep 2000
Posts: 4,211 |
quote: Originally posted by AllenAyres: would font tags closing before and opening after each li improve that? And I think MJ's point is that every tag must be closed in its proper nesting to validate.
About the tags, it'd at least make the source easier to work with, so that's worth something, I guess. And yeah, in order to get code to validate, especially XHTML, each tag has to have a closing tag and be properly nested. "Close them in reverse order of which you started them" is a good rule to remember when writing code.
|
|
|
|
Joined: Sep 2000
Posts: 4,211
Master Hacker
|
Master Hacker
Joined: Sep 2000
Posts: 4,211 |
quote: Originally posted by AllenAyres: they only validate to html 4.01
Right, which is way more lenient on things than XHTML.
|
|
|
|
Joined: Mar 2001
Posts: 7,394
Admin / Code Breaker
|
Admin / Code Breaker
Joined: Mar 2001
Posts: 7,394 |
You can try: [ list] => or something like that
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
that does validate LK, but adds an extra bullet to the top of the list https://ubbdev.com/ubbcgi/ultimatebb.cgi?ubb=get_topic;f=5;t=000184#000008 arrrggghhhh...
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
A cheesy way to work around that might be to make the first line in the list say
[*] List:
but that wouldn't look right ina lotta lists.
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
and, it looks like we broke the plain [*] with that now..
|
|
|
|
Joined: Mar 2001
Posts: 7,394
Admin / Code Breaker
|
Admin / Code Breaker
Joined: Mar 2001
Posts: 7,394 |
You can make: [ list]First item [ *]Second item [ *]Third Item ... [/list]
[ 12-10-2001 12:46 PM: Message edited by: LK ]
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
Yeah, that would work, but is a serious kludge and not an actual fix... plus [*] this is still broke I finished the [ code] part
|
|
|
|
Joined: Mar 2001
Posts: 7,394
Admin / Code Breaker
|
Admin / Code Breaker
Joined: Mar 2001
Posts: 7,394 |
What's your code?
Also, you can require [list whatever](.*?)[ *] or something like that, or just require [/*]...
[ 12-10-2001 02:03 PM: Message edited by: LK ]
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
By jove, I think I've got it ubb_lib is this: $_[0] =~ s/n?r?([*])(.+?)([/*])/ $2/isg; and lib_posting is this: $_[0] =~ s/( )(.+?)()/[*]$2[/*]/isg; It creates lists correctly and validates... This works if you aren't making a full list [*] test
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
Posting practices have to change to close the [ *] tag now with a [ /*] tag (no spaces)
|
|
|
|
Joined: Mar 2001
Posts: 7,394
Admin / Code Breaker
|
Admin / Code Breaker
Joined: Mar 2001
Posts: 7,394 |
Just when I got my other (and better) idea to work? [code][/code]And use only [ *] [ 12-10-2001 02:48 PM: Message edited by: LK ]
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
I'm all for better ideas This goes in ubb_lib, what about lib_posting where it is supposed to convert html back to ubb code?
|
|
|
|
Joined: Mar 2001
Posts: 7,394
Admin / Code Breaker
|
Admin / Code Breaker
Joined: Mar 2001
Posts: 7,394 |
I think your old code is gonna work...
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
which old code? right now it's breaking on edit... lemme see if I can pull the stuff out
|
|
|
|
Joined: Mar 2001
Posts: 7,394
Admin / Code Breaker
|
Admin / Code Breaker
Joined: Mar 2001
Posts: 7,394 |
Actually it won't work with your old code, but you can try:
$_[0] =~ s/( )(.+?)()/[*]$2/isg;
All others are like the original UBB's ones...
[ 12-10-2001 03:14 PM: Message edited by: LK ]
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
Done! This is what I had to do to get font tags in there too so it would validate: ubb_lib I should probably finish the font stuff for the ol, but this works and validates Thanks LK, and thanks MJ!
|
|
|
|
Joined: Mar 2001
Posts: 7,394
Admin / Code Breaker
|
Admin / Code Breaker
Joined: Mar 2001
Posts: 7,394 |
And won't it become the default font again?
|
|
|
|
Joined: Mar 2001
Posts: 7,394
Admin / Code Breaker
|
Admin / Code Breaker
Joined: Mar 2001
Posts: 7,394 |
Oh, you have it as the default font of body...
[ 12-10-2001 03:36 PM: Message edited by: LK ]
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
eh?
what won't?
you gotta close the font tags before starting the list and re-open them after the list is done...
|
|
|
|
Joined: Mar 2001
Posts: 7,394
Admin / Code Breaker
|
Admin / Code Breaker
Joined: Mar 2001
Posts: 7,394 |
It was a one-time thing Good job
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
my brain is tired
|
|
|
|
Joined: Nov 2000
Posts: 2,759
Pooh-Bah
|
Pooh-Bah
Joined: Nov 2000
Posts: 2,759 |
So what happens with an ordered list?
A, B, C ....
1, 2, 3 ....
-Tacks
|
|
|
|
Joined: Mar 2001
Posts: 7,394
Admin / Code Breaker
|
Admin / Code Breaker
Joined: Mar 2001
Posts: 7,394 |
- test
- test b
- test c
- test d
- test
- test 2
- test 3
- test 4
- test
- test B
- test C
- test D
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
Click that validate link Bay-Bay! Except for the ad code (can't do anything about it) every page produced from here on out should validate.
|
|
|
|
Joined: Sep 2000
Posts: 4,211
Master Hacker
|
Master Hacker
Joined: Sep 2000
Posts: 4,211 |
quote: Originally posted by tackaberry: So what happens with an ordered list?
We don't have to worry about that because all the lists generated by the UBB are unordered lists .
|
|
|
|
Joined: Sep 2000
Posts: 4,211
Master Hacker
|
Master Hacker
Joined: Sep 2000
Posts: 4,211 |
Or are they?
|
|
|
|
Joined: Sep 2000
Posts: 4,211
Master Hacker
|
Master Hacker
Joined: Sep 2000
Posts: 4,211 |
Thanks, never knew that before!
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 808
Joined: July 2001
|
|
Forums63
Topics37,574
Posts293,926
Members13,850
|
Most Online5,166 Sep 15th, 2019
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|
|
|
|