Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-10122

[list=] should support "none", along with CSS2 types

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Trivial Trivial
    • 3.1.12-RC1
    • 3.0.8
    • Posting
    • None

      Currently there's no way to use [list] without any symbol (which is useful for indents). You're teased to do something like this...

      [list]This is my indented text[/list]

      ...but that will render invalid HTML (as <ul> doesn't allow plain character data and expects a surrounding <li> at least).

      So I suggest to also use the type none for lists. To do so, only 2 files need to be modified:
      Open /includes/bbcode.php and find

      		else if (preg_match('#^(disc|circle|square)$#i', $type))

      replace with

      		else if (preg_match('#^(disc|circle|square|none)$#i', $type))


      Open /includes/message_parser.php and find

      			'list'			=> array('bbcode_id' => 9,	'regexp' => array('#\[list(?:=(?:[a-z0-9]|disc|circle|square))?].*\[/list]#ise' => "\$this->bbcode_parse_list('\$0')")),

      replace with

      			'list'			=> array('bbcode_id' => 9,	'regexp' => array('#\[list(?:=(?:[a-z0-9]|disc|circle|square|none))?].*\[/list]#ise' => "\$this->bbcode_parse_list('\$0')")),

      Furthermore CSS2 types should be allowed. For these the function bbcode_list in /includes/bbcode.php needs to be augmented with more ELSE IFs for

      • lower-greek
      • hebrew
      • decimal-leading-zero
      • cjk-ideographic
      • hiragana
      • katakana
      • hiragana-iroha
      • katakana-iroha

            CHItA CHItA
            AmigoJack AmigoJack
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: