Is It Possible To Modify [LIST] Behavior?

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
User avatar
Mulsiphix
Registered User
Posts: 189
Joined: Sun Oct 25, 2015 3:14 am
Location: USA
Contact:

Is It Possible To Modify [LIST] Behavior?

Post by Mulsiphix »

When you create a list, the individual list items are placed one line after the other. I am wondering if it is possible to change the behavior so there is a blank newline between each list item?

Current Behavior
  • List Item 1
  • List Item 2
  • List Item 3

Desired Behavior
  • List Item 1
     
  • List Item 2
     
  • List Item 3

User avatar
Mick
Support Team Member
Support Team Member
Posts: 22117
Joined: Fri Aug 29, 2008 9:49 am
Location: Cardiff

Re: Is It Possible To Modify [LIST] Behavior?

Post by Mick »

This little fiddle seems to work:
  • List Item 1
    • List Item 2
      • List Item 3

      Code: Select all

      [list]
      [*]List Item 1
      [list=][/list]
      [*]List Item 2
      [list=][/list]
      [*]List Item 3
      [/list]
      "The more connected we get the more alone we become" - Kyle Broflovski

      Please read: “Am I In The Right Place?” before posting.

      User avatar
      Mulsiphix
      Registered User
      Posts: 189
      Joined: Sun Oct 25, 2015 3:14 am
      Location: USA
      Contact:

      Re: Is It Possible To Modify [LIST] Behavior?

      Post by Mulsiphix »

      Ha! I wouldn't have guessed that would work. Thank you Mick ;).

      Empty Characters also do the trick (which is what I used in my post). This is easy with a Windows based Alt Code (Alt+0160), but Linux doesn't have these. Nor is entering Unicode characters universal among different distros. It is possible for me to create a [space] BBCode that inserts an empty character, but makes editing posts harder to read. It works, but it isn't ideal if another path is possible. Figured it was worth looking into :oops:.

      Most of my users are Linux users and [list] sees a lot of use. So I'm hoping the default BBCode could be edited somehow. I found these two files, but have no idea if such a thing would be possible here. I'm not sure how it could be done with a custom [list]BBCode either, given the behavior seems more complex than your average HTML/CSS entry could handle (for creating one).

      File 1
      include/bbcode.php

      File 2
      styles/prosilver/template/bbcode.html

      User avatar
      Mick
      Support Team Member
      Support Team Member
      Posts: 22117
      Joined: Fri Aug 29, 2008 9:49 am
      Location: Cardiff

      Re: Is It Possible To Modify [LIST] Behavior?

      Post by Mick »

      I imagine some setups could remove a blank character or stick something weird in there instead but I’m guessing.

      Maybe there’s a need for a [CRLF] button? :)
      "The more connected we get the more alone we become" - Kyle Broflovski

      Please read: “Am I In The Right Place?” before posting.

      User avatar
      AbaddonOrmuz
      Recognised Extension Developer
      Posts: 794
      Joined: Wed Dec 25, 2013 9:06 pm
      Location: /dev/null
      Name: Alfredo Ramos
      Contact:

      Re: Is It Possible To Modify [LIST] Behavior?

      Post by AbaddonOrmuz »

      Why not just adding a margin-bottom, with CSS?

      Code: Select all

      .postbody ul li {
      	margin-bottom: 1em;
      }
      
      .postbody ul li:last-child {
      	margin-bottom: 0;
      }
      Some of my phpBB extensions:
      Image Imgur | :chart_with_upwards_trend: SEO Metadata | Image Markdown | :lock: Auto-lock Topics
      :trophy: Check out all my validated extensions :trophy:

      :penguin: Arch Linux user :penguin:

      User avatar
      Mick
      Support Team Member
      Support Team Member
      Posts: 22117
      Joined: Fri Aug 29, 2008 9:49 am
      Location: Cardiff

      Re: Is It Possible To Modify [LIST] Behavior?

      Post by Mick »

      That’s ok if you want that action all the time.
      "The more connected we get the more alone we become" - Kyle Broflovski

      Please read: “Am I In The Right Place?” before posting.

      Post Reply

      Return to “[3.2.x] Support Forum”