Indentation in BBCODE

All suggestions about TPFC should be posted here. Discussions about changes to TPFC will also be carried out here.
Post Reply
Message
Author
User avatar
webfork
Posts: 10818
Joined: Wed Apr 11, 2007 8:06 pm
Location: US, Texas
Contact:

Indentation in BBCODE

#1 Post by webfork »

So I'm having some trouble with site update in regards to BBCODE's new indent system

--------------

TEXT AND TAGS:

Code: Select all

[indent]This only works on one line
the second line isn't indented even though the object isn't closed yet[/indent]

[list]
This works better but the first item is
always bulleted and not the second
[/list]
---------------

(UGLY) RESULT:

This only works on one line
the second line isn't indented even though the object isn't closed yet

  • This works better but the first item is
    always bulleted and not the second
--------------

I spent a huge amount of time getting longer posts formatted correctly and now many of them are broken. That often both affects readability and the logic behind the process (steps are less clear when it's not clear if they're part of the main list or a sub-set). I'm tempted just to post links to external documents.

Anyone know of a workaround?

billon
Posts: 843
Joined: Sat Jun 23, 2012 4:28 pm

Re: Indentation in BBCODE

#2 Post by billon »

Code: Select all

[list]
[*]This works better but the first item is
[*]always bulleted and not the second
[/list]
  • This works better but the first item is
  • always bulleted and not the second
:?:

User avatar
Midas
Posts: 6705
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: Indentation in BBCODE

#3 Post by Midas »

I have exactly the same problem. I have been correcting my past posts to clean the LIST tag I had been using for indentation, but I'm not really comfortable with the text processing limitations of the new BBCODE version.

A paragraph spanning INDENT tag would be perfect for me.

User avatar
__philippe
Posts: 687
Joined: Wed Jun 26, 2013 2:09 am

BBCODE current quirks

#4 Post by __philippe »

And speaking of current BBCODE quirks,
why does phpBB stubbornly and needlessly insist on duplicating quote marks, as in :
some quoted text
while a lone quote whould be (ahem...) "quote" enough ? :roll:

Specular
Posts: 443
Joined: Sun Feb 16, 2014 10:54 pm

Re: Indentation in BBCODE

#5 Post by Specular »

webfork wrote: Sat Jun 23, 2018 11:56 amSo I'm having some trouble with site update in regards to BBCODE's new indent system
For some reason the indent on this site just inserts some span element with whitespace characters (on one line) rather than wrapping the block of text in an element that could be then styled to have a whole left-side margin. I'm not sure what controls it (BBCode panel editor in the admin control panel?) but if that were changed to wrap text in an element instead you could get what you're after.
__philippe wrote: Sun Jun 24, 2018 7:00 am And speaking of current BBCODE quirks,
why does phpBB stubbornly and needlessly insist on duplicating quote marks, as in :
some quoted text
while a lone quote whould be (ahem...) "quote" enough ? :roll:
This is a simple fix in the stylesheet. See attached replacement icons.css within the zip.
Andrew Lee wrote: Sun Jun 03, 2018 5:49 pm.
Quoting from random thread so you get a notification and could maybe add the replacement stylesheet :)
Attachments
icons.zip
(845 Bytes) Downloaded 650 times

User avatar
Andrew Lee
Posts: 3048
Joined: Sat Feb 04, 2006 9:19 am
Contact:

Re: Indentation in BBCODE

#6 Post by Andrew Lee »

"icon.css" has been replaced. The spurious quotes are now gone.

I have also fixed the "indent" code with:

Code: Select all

<div style="margin-left: 3em;">{TEXT}</div>
Idea is from here.

Looks better now!

User avatar
__philippe
Posts: 687
Joined: Wed Jun 26, 2013 2:09 am

Re: Indentation in BBCODE

#7 Post by __philippe »

@Andrew
Colour me dense, but...
I still see TWO stacked (albeit dissimilar) quotes symbols,

...when a single one would be perfectly adequate...deferring to __phil's "least resource expenditure" principle...;-)

Specular
Posts: 443
Joined: Sun Feb 16, 2014 10:54 pm

Re: Indentation in BBCODE

#8 Post by Specular »

Thanks, Andrew!
__philippe wrote: Thu Jun 28, 2018 4:18 am @Andrew
Colour me dense, but... I still see TWO stacked (albeit dissimilar) quotes symbols,
...when a single one would be perfectly adequate...deferring to __phil's "least resource expenditure" principle...;-)
This is due to the browser loading the old stylesheet from the cache. Check this page to find the hotkey for your browser to force refreshing the site content. In Firefox I use Ctrl+Shift+R.

User avatar
__philippe
Posts: 687
Joined: Wed Jun 26, 2013 2:09 am

Re: Indentation in BBCODE

#9 Post by __philippe »

Well, I never... :shock:

Hats off to Specular for pinpointing the cached stylesheet :idea: mischievous shenanigans,
and to Andrew for wiping out the spurious quote in the first place...! 8)

shnbwmn
Posts: 265
Joined: Sat Jul 11, 2015 12:59 am

Re: Indentation in BBCODE

#10 Post by shnbwmn »

Looks much better now 8)

User avatar
__philippe
Posts: 687
Joined: Wed Jun 26, 2013 2:09 am

Re: List(s) BBCODE malfunction

#11 Post by __philippe »

Bulleted-List and Numbered-List BBCODE malfunction

As noted earlier by fellow TPFC members, one remaining BBCODE snag needs fixing:

It would be much convenient if the "Bulleted-List" and "Numbered list" BBCODE could be cajoled into working as expected, namely:

Simply wrapping the following sample block of lines

Code: Select all

line item a
line item b
line item c
within the "Bulleted-List" BBCODE should yield

Code: Select all

• line item a
• line item b
• line item c
With the current code, only the first line item gets bulleted; as a clumsy workaround, one need to manually prefix every line
(but the first one) with [*] to achieve the expected formatting

Likewise,
simply wrapping the sample block within the "Numbered-List" BBCODE
should produce, without further ado:

Code: Select all

1 line item a
2 line item b
3 line item c

User avatar
SYSTEM
Posts: 2041
Joined: Sat Jul 31, 2010 1:19 am
Location: Helsinki, Finland

Re: Indentation in BBCODE

#12 Post by SYSTEM »

@__philippe: That's how BBCode is supposed to work. Requiring [​*] allows a list item to span multiple lines, and it wouldn't be possible after the change you suggest.
My YouTube channel | Release date of my 13th playlist: August 24, 2020

User avatar
__philippe
Posts: 687
Joined: Wed Jun 26, 2013 2:09 am

Re: Indentation in BBCODE

#13 Post by __philippe »

@SYSTEM
Thanks for the clarification.

And yet... :wink:

I still find the local BBCODE usage to display "List-bulleted / List-numbered" items needlessly counter-intuitive,
compared to simpler implementations found in other kindred phpBB bulletin boards/conferencing systems,
never mind in staple text editors/notepads (such as: Qjot / Wordpad / Jovial...)

Ah well...can't please everyone everytime, can you?... :roll:

Post Reply