MyBB Community Forums

Full Version: Two lists within a list
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
To make two lists within an already made list is impossible. Check it!
  • Just to make it interesting >
    1. I'm organizing the post code so that you can see there's something wrong
  • And here's the tricky part
    1. See?

[ list ][size=1]
[ * ]Just to make it interesting >
[ list=1 ]
[ * ]I'm organizing the post code so that you can see there's something wrong
[ /list ]
[ * ]And here's the tricky part
[ list=1 ]
[ * ]See?
[ /list ] 
[ /list ]
(Notice: The code has been edited so it can be viewed without beeing rendered.)

(and obviously, [size] doesn't seem to work. Is there a tag I forgott to close maybe?)
Strange... i swear tag nesting used to be supported in mybb. Maybe it was lost when the new post engine was written.
Maybe... all I know is that it's not possible to make several lists within a containing list, and that's a needed feature (if you ask me).
The new version is fixed a bit more than this but the problem still exists.

An explanation would be that because of the way preg regular expressions work, they search for the next tag ([/list]). Now both [list ] and [list=x] lists use different html tags such as <ol> and <ul>. Its a big limitation on the way the regular expressions are handled, because the script may end up closing a tag the wrong way

For example, if you had [list=x] then opened a [list ] inside of the other one:
[ *] [list ] [ *]blah[/list]

It would be replaced with something along the lines of


Thats where the limitation of this currently lies at in the next version (its a slight improvement than over ehre though).

I'm willing to listen to any suggestions, as well as look at any code examples if you have them

Use [/list=x] then. It shouldn't get confused that way??