dopetalk does not endorse any advertised product nor does it accept any liability for it's use or misuse

This website has run out of funding so feel free to contribute if you can afford it (see footer)

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

Offline Chip (OP)

  • Server Admin
  • Hero Member
  • *****
  • Administrator
  • *****
  • Join Date: Dec 2014
  • Location: Australia
  • Posts: 6648
  • Reputation Power: 0
  • Chip has hidden their reputation power
  • Gender: Male
  • Last Login:Yesterday at 05:53:23 PM
  • Deeply Confused Learner
  • Profession: IT Engineer
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 »
friendly
0
funny
0
informative
0
agree
0
disagree
0
like
0
dislike
0
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions
Our Discord Server invitation link is https://discord.gg/jB2qmRrxyD

Offline Chip (OP)

  • Server Admin
  • Hero Member
  • *****
  • Administrator
  • *****
  • Join Date: Dec 2014
  • Location: Australia
  • Posts: 6648
  • Reputation Power: 0
  • Chip has hidden their reputation power
  • Gender: Male
  • Last Login:Yesterday at 05:53:23 PM
  • Deeply Confused Learner
  • Profession: IT Engineer
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';
friendly
0
funny
0
informative
0
agree
0
disagree
0
like
0
dislike
0
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions
Our Discord Server invitation link is https://discord.gg/jB2qmRrxyD

Tags:
 


dopetalk does not endorse any advertised product nor does it accept any liability for it's use or misuse





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
SimplePortal 2.3.6 © 2008-2014, SimplePortal