RolePlay onLine RPoL Logo

, welcome to Technical Discussions

14:10, 28th March 2024 (GMT+0)

Multi-level lists?

Posted by Genghis the Hutt
Genghis the Hutt
member, 2492 posts
Just an average guy :)
Tue 22 May 2018
at 15:13
  • msg #1

Multi-level lists?

I tried:

[olist]
[*] [olist]
[*] Stuff
[*] [*] Stuff 1
[*] [*] Stuff 2
[*]
[/olist]
[/olist]

And a few other variations, but couldn't get it to work -- are multi-level lists allowed by the code?
MalaeDezeld
member, 72 posts
Tue 22 May 2018
at 15:15
  • msg #2

Multi-level lists?

You don't double the [*]

[olist]
[*] [olist]
[*] Stuff
[*] Stuff 1
[*] Stuff 2
[*]
[/olist]
[/olist]

would show up as

    1. Stuff
    2. Stuff 1
    3. Stuff 2

Genghis the Hutt
member, 2493 posts
Just an average guy :)
Tue 22 May 2018
at 17:09
  • msg #3

Multi-level lists?

  1. more test
    1. Stuff
    2. Stuff 1
    3. Stuff 2

  2. test


Hunh, that is weird.  I would have sworn it was putting "olist" in as text in a game's thread when I tried that.  Be right back.

Edit: Go into a game, click "Character Details" then click to edit your description.  Put that in and you'll find that you can't have a multi-level list there, apparently, but you can in a regular thread.  Is this a bug or working as intended?
This message was last edited by the user at 17:12, Tue 22 May 2018.
steelsmiter
member, 1891 posts
BESM, Fate, Indies, PBTA
NO FREEFORM! NO d20!
Tue 22 May 2018
at 17:15
  • msg #4

Re: Multi-level lists?

Genghis the Hutt:
  1. more test
    1. Stuff
    2. Stuff 1
    3. Stuff 2

  2. test


Hunh, that is weird.  I would have sworn it was putting "olist" in as text in a game's thread when I tried that.  Be right back.

Edit: Go into a game, click "Character Details" then click to edit your description.  Put that in and you'll find that you can't have a multi-level list there, apparently, but you can in a regular thread.  Is this a bug or working as intended?

If you don't want the two, remove the dot in front of the second olist

  1. more test
    1. Stuff
    2. Stuff 1
    3. Stuff 2

  2. test


[olist]
[*] more test
[olist]
[*] Stuff
[*] Stuff 1
[*] Stuff 2
[/olist]
[*] test
[/olist]
Genghis the Hutt
member, 2494 posts
Just an average guy :)
Tue 22 May 2018
at 17:26
  • msg #5

Re: Multi-level lists?

Cool, thanks.  So I guess it works everywhere but in the character description.
This message was last edited by the user at 17:26, Tue 22 May 2018.
steelsmiter
member, 1892 posts
BESM, Fate, Indies, PBTA
NO FREEFORM! NO d20!
Tue 22 May 2018
at 17:32
  • msg #6

Re: Multi-level lists?

Yeah, I got the regular list to work, and even that had the numbers crammed under the picture.
MalaeDezeld
member, 73 posts
Tue 22 May 2018
at 17:33
  • msg #7

Re: Multi-level lists?

The ordered list works for me (as a gm). Maybe you have code somewhere else that broke that list; like a list opened but not close.
steelsmiter
member, 1893 posts
BESM, Fate, Indies, PBTA
NO FREEFORM! NO d20!
Tue 22 May 2018
at 17:34
  • msg #8

Re: Multi-level lists?

MalaeDezeld:
The ordered list works for me (as a gm). Maybe you have code somewhere else that broke that list; like a list opened but not close.

The ordered list isn't the problem (for me as a GM as well). The problem is nesting a list within a list.
steelsmiter
member, 1894 posts
BESM, Fate, Indies, PBTA
NO FREEFORM! NO d20!
Tue 22 May 2018
at 17:43
  • msg #9

Re: Multi-level lists?

Example photo of the exact code used in message 4 on a Character Description as GM: https://cdn.discordapp.com/att...60768779/unknown.png

Note how 1, 2, 3 and 4 are crammed into the picture, and how the nesting that works fine in message 4 here are ignored in the description
MalaeDezeld
member, 74 posts
Tue 22 May 2018
at 17:53
  • msg #10

Re: Multi-level lists?

Sorry, I misread, I thought it was the character sheet...

You are right, I confirm, that nesting olist doesn't work in the character description.

A list containing a olist work, but it is flat when it is align with the character icon. (And with the problem of the numbers in the picture).
horus
member, 488 posts
Wayfarer of the
Western Wastes
Tue 22 May 2018
at 21:58
  • msg #11

Re: Multi-level lists?

This is an interesting experiment.  Thank all of you for investigating this.

Do HTML and Easy Tables work in a Character Description?  (I'll have to run and find out now.)

And... yes, they do.  Tables can be used to make lists that appear nested, although it is not so straightforward as olists or list+s are to use.
This message was last edited by the user at 22:10, Tue 22 May 2018.
LonePaladin
member, 723 posts
Creator of HeroForge
Wed 23 May 2018
at 04:21
  • msg #12

Re: Multi-level lists?

It's worth noting that once you have all the formatting for a list made up, you can compress it all into a single line. If you want nested lists, it helps to work backwards.

  1. Put some placeholder text for your base-level list. Nothing fancy.
  2. At the point where you want a sub-list:
    1. Write up each line of the list, with all the formatting you want.
    2. Highlight those lines, and click on the list+[*] or olist+[*] link, so that the sub-list gets the proper tag and stars.
    3. Then, go into that sublist and remove all the line breaks. Make sure the line with the [list] or [olist] tag is merged with the line above it. Also take the next line (if any) and move it up as well, or you'll have an extra line-break after the sublist. (This is because line-breaks don't interrupt list formatting, it just makes line-breaks within the bullet point.)
  3. Now go back to the main list and click on the list+[*] or olist+[*] link. This will put tags on each line, but the nested list will be considered part of the line above it. You can go back to the sublist and put line-breaks back in if you want.


For example:
[olist]
[*] List 1
[*] List 2[olist][*] List 2.1[*] List 2.2[*] List 2.3[/olist][*] List 3
[*] List 4
[/olist]

Produces:
  1. List 1
  2. List 2
    1. List 2.1
    2. List 2.2
    3. List 2.3
  3. List 3
  4. List 4

horus
member, 489 posts
Wayfarer of the
Western Wastes
Wed 23 May 2018
at 11:09
  • msg #13

Re: Multi-level lists?

LonePaladin:
{Snip}

For example:
[olist]
[*] List 1
[*] List 2[olist][*] List 2.1[*] List 2.2[*] List 2.3[/olist][*] List 3
[*] List 4
[/olist]

Produces:
  1. List 1
  2. List 2
    1. List 2.1
    2. List 2.2
    3. List 2.3
  3. List 3
  4. List 4


Have you tried this in a character description?  It produces different results in that location when I try it.  (Running a derivative of Google Chrome...)
LonePaladin
member, 724 posts
Creator of HeroForge
Wed 23 May 2018
at 15:10
  • msg #14

Re: Multi-level lists?

It's not just you; for some reason the description pane seems to dislike using nested lists.
horus
member, 490 posts
Wayfarer of the
Western Wastes
Wed 23 May 2018
at 21:52
  • msg #15

Re: Multi-level lists?

LonePaladin:
It's not just you; for some reason the description pane seems to dislike using nested lists.

That's odd because from the look of things jase is using the same editor module for most anything that requires editing a text file.  That would seem to indicate the file format for character descriptions is somehow different from that of a post or a character sheet.

(I just confirmed that character sheets do allow this kind of nesting and parse it correctly.  Couldn't remember if anyone had done that yet.)
Genghis the Hutt
member, 2501 posts
Just an average guy :)
Wed 23 May 2018
at 22:17
  • msg #16

Re: Multi-level lists?

(MalaeDezeld tried that.) :)
jase
admin, 3593 posts
Cogito, ergo procuro.
Carpe stultus!
Thu 24 May 2018
at 01:02
  • msg #17

Re: Multi-level lists?

It might not be working in character sheet/descriptions because they've been migrated to PHP scripts (which you can tell as it'll have ".php" as part if the URL, e.g. "gameinfo.php").  If it works in .cgi files (Perl) but not .php (PHP) then it's 'cos I haven't coded the same rules for both languages, will have to investigate/fix.
horus
member, 491 posts
Wayfarer of the
Western Wastes
Thu 24 May 2018
at 13:45
  • msg #18

Re: Multi-level lists?

In reply to jase (msg # 17):

Thanks, jase.
Sign In