News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Why No 'Insert Alphabetical List' BBCode?

Started by Steve, July 24, 2014, 08:37:15 AM

Previous topic - Next topic

Steve

Not sure if this goes here or not so move it if needed please.


Why doesn't SMF use the sort alphabetically list bbcode?
DO NOT pm me for support!

Arantor


Justyne

I am not sure how universally useful that would be, but you can probably code it fairly easily.

Do you want this to be a button in the post menu or just a hidden BBC tag.
Ever tried. Ever failed. No matter. Try Again. Fail again. Fail better.

Steve

@ ‽ - Wow ... that's surprising.

I hate referencing another type of forum software but when I was using IPB one could have their list show up like so:

[list=a]
[*] item 1
[*] item 2
[/list]


Which gave you:

     a) item 1
     b) item 2

etc.

@ Justyne - a button next to the bullets and numerical list ones would be optimal but either would be good. :)
DO NOT pm me for support!

Arantor

That's actually borderline impossible in SMF as it currently stands, at least not sanely. The way the bbc parser works is... complicated, but basically it treats tags as largely unique items on their own and only cares about certain hierarchical constraints (list must contain li, li must be in a list, sort of thing)

I'd also point out that [*] can also be used
  • in a free standing list
  • without list tags
  • because it'll just make one for you

    I'd also point out that [nobbc][*][/nobbc] can also be used
    [*]in a free standing list
    [*]without list tags
    [*]because it'll just make one for you


    I suppose if one were to intercept the preparser and force a resort on post save, that might work but trying to deal with it in the 1500 lines of parse_bbc is a route to the asylum.

Steve

Ah, okay. No worries then. It's not a big deal and can be lived without. Thanks for the explanation. :D
DO NOT pm me for support!

Justyne

Oh like that.

I thought you meant something llike this:

[list type=alphabetical]
[li]apples[/li]
[li]tangerines[/li]
[li]oranges[/li]
[li]pears[/li]
[/list]


where you'd get


  • apples
  • oranges
  • pears
  • tangerines

Shows my power of comprehension. XD
Ever tried. Ever failed. No matter. Try Again. Fail again. Fail better.

Steve

I actually hadn't thought of that. That might be useful but I have a feeling it wouldn't get used enough to make it worthwhile. :)
DO NOT pm me for support!

Justyne

Hence my comment on not being sure how universally useful that would be. XD
Ever tried. Ever failed. No matter. Try Again. Fail again. Fail better.

Shambles

Quote from: Steve
Which gave you:

     a) item 1
     b) item 2

Bit of a bugger if you had more than 26 items in your list  :-\

Steve

DO NOT pm me for support!

Arantor

Oh wait, I misunderstood too. I thought exactly the same, that it was about alphabetising the contents.


  • item 1
  • item 2

[list type=lower-alpha]
[li]item 1[/li]
[li]item 2[/li]
[/list]


Core feature. There's a whole dirty great list of supported types, which is: none|disc|circle|square|decimal|decimal-leading-zero|lower-roman|upper-roman|lower-alpha|upper-alpha|lower-greek|lower-latin|upper-latin|hebrew|armenian|georgian|cjk-ideographic|hiragana|katakana|hiragana-iroha|katakana-iroha where | is a separator.

Steve

Well I'll be dipped. Is this documented anywhere?

Thanks!
DO NOT pm me for support!

Justyne

Ever tried. Ever failed. No matter. Try Again. Fail again. Fail better.

Advertisement: