Previous Thread
Next Thread
Print Thread
Rate Thread
#109192 12/10/2001 1:22 AM
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


- Allen wavey
- What Drives You?
Sponsored Links
#109193 12/10/2001 5:35 AM
Joined: Mar 2001
Posts: 7,394
LK Offline
Admin / Code Breaker
Admin / Code Breaker
Offline
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 ]

  • #109194 12/10/2001 9:56 AM
    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 ]

  • #109195 12/10/2001 11:05 AM
    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


    - Allen wavey
    - What Drives You?
    #109196 12/10/2001 11:40 AM
    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


    - Allen wavey
    - What Drives You?
    Sponsored Links
    #109197 12/10/2001 11:43 AM
    Joined: Mar 2001
    Posts: 7,394
    LK Offline
    Admin / Code Breaker
    Admin / Code Breaker
    Offline
    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.

    #109198 12/10/2001 12:03 PM
    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?

  • #109199 12/10/2001 12:09 PM
    Joined: Mar 2001
    Posts: 7,394
    LK Offline
    Admin / Code Breaker
    Admin / Code Breaker
    Offline
    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.

  • #109200 12/10/2001 12:09 PM
    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.


  • - Allen wavey
    - What Drives You?
    #109201 12/10/2001 12:12 PM
    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.


    - Allen wavey
    - What Drives You?
    Sponsored Links
    #109202 12/10/2001 12:19 PM
    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...


    - Allen wavey
    - What Drives You?
    #109203 12/10/2001 12:22 PM
    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.

    #109204 12/10/2001 12:28 PM
    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.

    #109205 12/10/2001 12:34 PM
    Joined: Mar 2001
    Posts: 7,394
    LK Offline
    Admin / Code Breaker
    Admin / Code Breaker
    Offline
    Joined: Mar 2001
    Posts: 7,394
    You can try:
    [ list] =>

    • [ *] =>

    • [ /list] =>


    or something like that

    #109206 12/10/2001 12:53 PM
    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...


    - Allen wavey
    - What Drives You?
    #109207 12/10/2001 12:56 PM
    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.


    - Allen wavey
    - What Drives You?
    #109208 12/10/2001 12:58 PM
    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..


    - Allen wavey
    - What Drives You?
    #109209 12/10/2001 1:45 PM
    Joined: Mar 2001
    Posts: 7,394
    LK Offline
    Admin / Code Breaker
    Admin / Code Breaker
    Offline
    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 ]

    #109210 12/10/2001 2:54 PM
    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


    - Allen wavey
    - What Drives You?
    #109211 12/10/2001 3:02 PM
    Joined: Mar 2001
    Posts: 7,394
    LK Offline
    Admin / Code Breaker
    Admin / Code Breaker
    Offline
    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 ]

    #109212 12/10/2001 3:21 PM
    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 laugh

    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


    - Allen wavey
    - What Drives You?
    #109213 12/10/2001 3:24 PM
    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)


    - Allen wavey
    - What Drives You?
    #109214 12/10/2001 3:46 PM
    Joined: Mar 2001
    Posts: 7,394
    LK Offline
    Admin / Code Breaker
    Admin / Code Breaker
    Offline
    Joined: Mar 2001
    Posts: 7,394
    Just when I got my other (and better) idea to work?

    [code][/code]And use only [ *] smile

    [ 12-10-2001 02:48 PM: Message edited by: LK ]

    #109215 12/10/2001 3:54 PM
    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?


    - Allen wavey
    - What Drives You?
    #109216 12/10/2001 4:00 PM
    Joined: Mar 2001
    Posts: 7,394
    LK Offline
    Admin / Code Breaker
    Admin / Code Breaker
    Offline
    Joined: Mar 2001
    Posts: 7,394
    I think your old code is gonna work...

    #109217 12/10/2001 4:05 PM
    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


    - Allen wavey
    - What Drives You?
    #109218 12/10/2001 4:12 PM
    Joined: Mar 2001
    Posts: 7,394
    LK Offline
    Admin / Code Breaker
    Admin / Code Breaker
    Offline
    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 ]

    #109219 12/10/2001 4:29 PM
    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
    Code
    [/code]

    lib_posting

    [code]

    I should probably finish the font stuff for the ol, but this works and validates laugh Thanks LK, and thanks MJ! laugh


    - Allen wavey
    - What Drives You?
    #109220 12/10/2001 4:33 PM
    Joined: Mar 2001
    Posts: 7,394
    LK Offline
    Admin / Code Breaker
    Admin / Code Breaker
    Offline
    Joined: Mar 2001
    Posts: 7,394
    And won't it become the default font again?

    • test
    • test #2

    #109221 12/10/2001 4:34 PM
    Joined: Mar 2001
    Posts: 7,394
    LK Offline
    Admin / Code Breaker
    Admin / Code Breaker
    Offline
    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 ]

    #109222 12/10/2001 4:35 PM
    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...


    - Allen wavey
    - What Drives You?
    #109223 12/10/2001 4:38 PM
    Joined: Mar 2001
    Posts: 7,394
    LK Offline
    Admin / Code Breaker
    Admin / Code Breaker
    Offline
    Joined: Mar 2001
    Posts: 7,394
    It was a one-time thing Good job

    #109224 12/10/2001 4:41 PM
    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


    - Allen wavey
    - What Drives You?
    #109225 12/10/2001 4:51 PM
    Joined: Nov 2000
    Posts: 2,759
    Pooh-Bah
    Pooh-Bah
    Offline
    Joined: Nov 2000
    Posts: 2,759
    So what happens with an ordered list?

    A, B, C ....

    1, 2, 3 ....

    -Tacks

    #109226 12/10/2001 4:54 PM
    Joined: Mar 2001
    Posts: 7,394
    LK Offline
    Admin / Code Breaker
    Admin / Code Breaker
    Offline
    Joined: Mar 2001
    Posts: 7,394
    1. test
    2. test b
    3. test c
    4. test d


    1. test
    2. test 2
    3. test 3
    4. test 4


    1. test
    2. test B
    3. test C
    4. test D

    #109227 12/10/2001 5:00 PM
    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. laugh


    - Allen wavey
    - What Drives You?
    #109228 12/10/2001 5:19 PM
    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
      .

    #109229 12/10/2001 5:25 PM
    Joined: Sep 2000
    Posts: 4,211
    Master Hacker
    Master Hacker
    Joined: Sep 2000
    Posts: 4,211
    Or are they?

    #109230 12/10/2001 9:50 PM
    Joined: Mar 2000
    Posts: 21,079
    Likes: 3
    I type Like navaho
    I type Like navaho
    Joined: Mar 2000
    Posts: 21,079
    Likes: 3
    You can choose to make an order list:

    [ list=1] for numeric lists

    [ list=a] for alpha lists

    https://www.ubbdev.com/ubb/ultimatebb.php?ubb=ubb_code_page


    - Allen wavey
    - What Drives You?
    #109231 12/11/2001 11:59 AM
    Joined: Sep 2000
    Posts: 4,211
    Master Hacker
    Master Hacker
    Joined: Sep 2000
    Posts: 4,211
    Thanks, never knew that before!


    Link Copied to Clipboard
    Donate Today!
    Donate via PayPal

    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.
    Recommended Hosts
    We have personally worked with and recommend the following Web Hosts:
    Stable Host
    bluehost
    InterServer
    Visit us on Facebook
    Member Spotlight
    isaac
    isaac
    California
    Posts: 1,157
    Joined: July 2001
    Forum Statistics
    Forums63
    Topics37,573
    Posts293,925
    Members13,849
    Most Online5,166
    Sep 15th, 2019
    Today's Statistics
    Currently Online
    Topics Created
    Posts Made
    Users Online
    Birthdays
    Top Posters
    AllenAyres 21,079
    JoshPet 10,369
    LK 7,394
    Lord Dexter 6,708
    Gizmo 5,833
    Greg Hard 4,625
    Top Posters(30 Days)
    Top Likes Received
    isaac 82
    Gizmo 20
    Brett 7
    WebGuy 2
    Morgan 2
    Top Likes Received (30 Days)
    None yet
    The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

     
    Powered by UBB.threads™ PHP Forum Software 8.0.0
    (Preview build 20240430)