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: 7905
Joined: Wed Apr 11, 2007 8:06 pm
Location: US, Texas
Contact:

Indentation in BBCODE

#1 Post by webfork » Sat Jun 23, 2018 11:56 am

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?
Supporting Net Neutrality - BattleForTheNet | Why this matters | More from EFF.org

User avatar
billon
Posts: 592
Joined: Sat Jun 23, 2012 4:28 pm

Re: Indentation in BBCODE

#2 Post by billon » Sat Jun 23, 2018 2:28 pm

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
:?:
Image

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

Re: Indentation in BBCODE

#3 Post by Midas » Sat Jun 23, 2018 4:25 pm

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: 502
Joined: Wed Jun 26, 2013 2:09 am

BBCODE current quirks

#4 Post by __philippe » 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:

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

Re: Indentation in BBCODE

#5 Post by Specular » Wed Jun 27, 2018 6:32 am

webfork wrote:
Sat Jun 23, 2018 11:56 am
So 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 32 times

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

Re: Indentation in BBCODE

#6 Post by Andrew Lee » Thu Jun 28, 2018 2:26 am

"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: 502
Joined: Wed Jun 26, 2013 2:09 am

Re: Indentation in BBCODE

#7 Post by __philippe » 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...;-)

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

Re: Indentation in BBCODE

#8 Post by Specular » Thu Jun 28, 2018 4:45 am

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: 502
Joined: Wed Jun 26, 2013 2:09 am

Re: Indentation in BBCODE

#9 Post by __philippe » Thu Jun 28, 2018 5:52 am

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 » Thu Jun 28, 2018 12:55 pm

Looks much better now 8)

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

Re: List(s) BBCODE malfunction

#11 Post by __philippe » Fri Jun 29, 2018 1:41 pm

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: 1783
Joined: Sat Jul 31, 2010 1:19 am
Location: Helsinki, Finland

Re: Indentation in BBCODE

#12 Post by SYSTEM » Fri Jun 29, 2018 7:42 pm

@__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 12th playlist: November 1, 2018

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

Re: Indentation in BBCODE

#13 Post by __philippe » Sat Jun 30, 2018 4:45 am

@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