Lists: Bulletted and Ordered

Be sure to read and follow the guidelines for our forums.

May 8, 2025 8:57 am
Just a quick question about lists.

How do you format them?

I've just realised that none of the formatting options above include the option to format a bulleted or an ordered list. I've tried the usual BBcode I'vce used on other forums.

[List]
[*] Bullet point 1
[*] Bullet Point 2
[*] Bullet Point 3 etc.
[/list]

But as you can see, it doesn't work.
May 8, 2025 11:31 am
There are no special BBcodes for lists on GP, as far as I'm aware.

I usually just use asterisks when I need to quickly list things, and for more permanent ones grab some fancy symbols to fit the theming. Like:
♣ Object 1
♣ Object 2
♣ Object 3
♣ Object 4

Various stars ✦ are pretty good for it. :D
May 8, 2025 1:38 pm
There's no built-in list support. It can be done with the f tag, but it's clunky, and FlyingSucculent's method is usually simplest.


Item one
Item two



Item one
Item two


(code)
[f=list-style:auto display:block padding-inline-start:1rem]
[f=display:list-item]Item one[/f]
[f=display:list-item]Item two[/f]
[/f]

[f=list-style:disc display:block padding-inline-start:1rem]
[f=display:list-item]Item one[/f]
[f=display:list-item]Item two[/f]
[/f]
May 8, 2025 1:51 pm
Just gonna hop in and bring up that I've been informed some screen readers don't handle special characters well. (Ironic, since my game ads are full of emojis.)
May 8, 2025 1:59 pm
^ Yeah, that is a concern if your players use them, so probably worth checking in advance. Although I think most of the common symbols should be alright? Asterisks are probably the most universal in that sense.
(A number of emojis also display differently on different devices; always messes with the aesthetics. 😔)
May 8, 2025 2:40 pm
I just the bullet character • (also ·) which many keyboards can type (for me it is compose key .= (and compose key .-)). These should display almost everywhere as they are not 'emojies' or anything special. * and - is also safe bets.

Indenting nested lists is a bit of a pain, you can either use [ f] codes, or non-breaking spaces (compose space space).

I still mean to get the code running on my own system and then look into a few changes, turning [list] and [list=1] into < ul>< li> and < ol>< li> should be easy enough.
May 8, 2025 3:38 pm
@vagueGM If you do implement this, I'd suggest using the nestedReplace function (example) rather than the simple regex approach (example), as this will give you the ability to nest lists. Whilst you can use recursive regex in PhP, it'll barf when a post gets too large (hence the reason for nestedReplace).
May 8, 2025 6:08 pm
Adam says:
... nestedReplace function ...
Thanks, Adam. I definitely plan for them to be nestable, list within lists is what really sets them apart from just straight text. :)
May 8, 2025 6:48 pm
The only issues I can think of with the asterisk idea is a) that if the bullet point goes on to a second line it won't automatically indent, and of course you can't do nested bullet points.


The quick brown fox jumped over the lazy dog.
Mary had a little lamb, its fleece was white as snow
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
May 8, 2025 7:19 pm
The lack of next line indentation is a pain, but you can manually indent the start with non-breaking spaces, you can do a web search and copy paste them.
May 9, 2025 5:39 am
You could use a table like this?

 
[table=compact]
*|item 1
|[i]blurb blurb blurb blurb[/i]
*|item 2
|[i]blurb blurb blurb blurb[/i]
*|item 3
|[i]blurb blurb blurb blurb[/i]
[/table]  


*item 1
blurb blurb blurb blurb
*item 2
blurb blurb blurb blurb
*item 3
blurb blurb blurb blurb
May 9, 2025 6:52 am
Dr_B says:
You could use a table like this?

 
[table=compact]
*|item 1
|[i]blurb blurb blurb blurb[/i]
*|item 2
|[i]blurb blurb blurb blurb[/i]
*|item 3
|[i]blurb blurb blurb blurb[/i]
[/table]  


*item 1
blurb blurb blurb blurb
*item 2
blurb blurb blurb blurb
*item 3
blurb blurb blurb blurb
That's bloody genius. We should collect all these clever hacks into a thread.
May 9, 2025 7:19 am
Didz says:
and of course you can't do nested bullet points.
You could kind of do that by formatting the table. Each indent, you move 1 column to the right (use | to add a column):

[table=compact]
*|item 1
|[i]blurb blurb blurb [/i]
|[i]blurb blurb blurb [/i]
|[i]blurb blurb blurb [/i]
|[f=right]>[/f]|item 1 attachment
||[i]item 1 attachment blurb[/i]
*|item 2
|[i]blurb blurb blurb [/i]
|[f=right]>[/f]|item 2 attachment
||[i]item 2 attachment blurb[/i]
||[i]item 2 attachment blurb[/i]
*|item 3
|[i]blurb blurb blurb [/i]
|[i]blurb blurb blurb [/i]
|[f=right]>[/f]|item 3 attachment
||[i]item 3 attachment blurb[/i]
[/table]


*item 1
blurb blurb blurb
blurb blurb blurb
blurb blurb blurb
>item 1 attachment
item 1 attachment blurb
*item 2
blurb blurb blurb
>item 2 attachment
item 2 attachment blurb
item 2 attachment blurb
*item 3
blurb blurb blurb
blurb blurb blurb
>item 3 attachment
item 3 attachment blurb
Last edited May 10, 2025 10:43 am

You do not have permission to post in this thread.