If you need any help or a chat then IM/PM or email me, Chip

Author Topic: Better [list] [li] x [/li] [/list] Handling with Padding  (Read 196 times)

Offline Chip (OP)

  • Server Admin
  • Moderator
  • Hero Member
  • ***
  • Administrator
  • *****
  • Join Date: Dec 2014
  • Location: Australia
  • Posts: 6167
  • Reputation Power: 0
  • Chip has hidden their reputation power
  • Gender: Male
  • Last Login:Today at 05:03:40 PM
  • Deeply Confused Learner
Better [list] [li] x [/li] [/list] Handling with Padding
« on: October 21, 2019, 02:21:42 PM »
see: https://www.simplemachines.org/community/index.php?topic=570184.msg4035152#msg4035152

In ./Sources/Subs-Editor.php

Code: [Select]
                        array(
                                'image' => 'li',
                                'code' => 'li',
                                'before' => '[li]',
                                'after' => '[/li]',
                                'description' => $txt['bbc_li']
                        ),
                        array(
                                'image' => 'li_padded',
                                'code' => 'li_padded',
                                'before' => '[li style="padding-bottom:1em"]',
                                'after' => '[/li]',
                                'description' => $txt['bbc_li_padded']
                        ),
                        array(
                                'image' => 'list',
                                'code' => 'list',
                                'before' => '[list]',
                                'after' => '[/list]',
                                'description' => $txt['list_unordered']
                        ),
                        array(
                                'image' => 'orderlist',
                                'code' => 'orderlist',
                                'before' => '[list type=decimal]',
                                'after' => '[/list]',
                                'description' => $txt['list_ordered']
                        ),

The "li.gif" and the "li_padded.gif" icons need to be copied to ./Themes/default/images/bbc



and maybe implement this:

Might be a good idea to use margin instead of padding. Just in case some nutter decides to throw extra styling at .bbc_list and ends up with something that looks weird with a padded li.
Thanks for the feedback - done!

In ./Sources/Subs-Editor.php
Code: [Select]
array(
'image' => 'list_padded',
'code' => 'list',
'before' => '[list]\n[li style="margin-bottom:1em"]',
'after' => '[/li]\n[li style="margin-bottom:1em"][/li]\n[/list]',
'description' => $txt['list_unordered_padded']
),
array(
'image' => 'orderlist_padded',
'code' => 'orderlist',
'before' => '[list type=decimal]\n[li style="margin-bottom:1em"]',
'after' => '[/li]\n[li style="margin-bottom:1em"][/li]\n[/list]',
'description' => $txt['list_ordered_padded']
),

Surprised that works, the bbc fixer-upper in preparsecode doesn’t like that kind of thing.
« Last Edit: October 22, 2019, 09:52:16 AM by Chip »
I do not condone or support any illegal activities. All information is for theoretical discussion and wonder.
All activities discussed are considered fictional and hypothetical. Information of all discussion has been derived from online research and in the spirit of personal Freedom.

Offline Chip (OP)

  • Server Admin
  • Moderator
  • Hero Member
  • ***
  • Administrator
  • *****
  • Join Date: Dec 2014
  • Location: Australia
  • Posts: 6167
  • Reputation Power: 0
  • Chip has hidden their reputation power
  • Gender: Male
  • Last Login:Today at 05:03:40 PM
  • Deeply Confused Learner
Re: Better [list] [li] x [/li] [/list] Handling with Padding
« Reply #1 on: October 29, 2019, 03:45:46 AM »
... whoops, I forgot - to see the button hover functions:

in ./Themes/default/languages/Post.english.php:

after:
Code: [Select]
$txt['bbc_quote'] = 'Insert Quote';
add:
Code: [Select]
$txt['bbc_li'] = 'Insert List Item';
$txt['bbc_li_padded'] = 'Insert List Item with Padding';
I do not condone or support any illegal activities. All information is for theoretical discussion and wonder.
All activities discussed are considered fictional and hypothetical. Information of all discussion has been derived from online research and in the spirit of personal Freedom.

Tags:
 





TERMS AND CONDITIONS

In no event will d&u or any person involved in creating, producing, or distributing site information be liable for any direct, indirect, incidental, punitive, special or consequential damages arising out of the use of or inability to use d&u. You agree to indemnify and hold harmless d&u, its domain founders, sponsors, maintainers, server administrators, volunteers and contributors from and against all liability, claims, damages, costs and expenses, including legal fees, that arise directly or indirectly from the use of any part of the d&u site.


TO USE THIS WEBSITE YOU MUST AGREE TO THE TERMS AND CONDITIONS ABOVE



Founded December 2014