Additional Info
Type
Package ID
GL700Wing:BBCodeWithStyle
First Created
September 16, 2024, 04:33:58 AM
Last Updated
September 22, 2024, 07:07:17 PM

BBCode With Style for SMF 2.1 v1.0

Adds the option to use classes and styles in hr, img, list, and table tags and adds two new tags.
Compatible With 2.1.4
Latest version v1.0
Downloads 35
Reviews 0
Rating 0/5
Subscribers 0
License BSD 2-Clause "Simplified" License (View License)
Author(s)
Screenshots
BBCode With Style for SMF 2.1
By GL700Wing
(Based on BBCode With Style mod by davidhs)



Note: For SMF 2.0 use the BBCode With Style mod.



Important note for SMF 2.0 forums that used the BBCode With Style mod:
For messages that have been migrated/imported from SMF 2.0 this mod will correctly display BBCodes containing mod-specific BBCode tag options (img; table; list; hr; etc tags with classes; styles; etc) that were created using the BBCode With Style mod.

However, in order to workaround an issue with the SCEditor (which SMF 2.1 uses) removing non-standard BBCode tag options (eg: classes; styles; etc) from default BBCode tags (eg: img; table; list; hr; etc) when editing an existing message using the More -> Modify option this mod uses custom BBCode tags (ie: bbcws_img; bbcws_table; bbcws_list; bbcws_hr; etc).

If it is necessary to edit a message migrated/imported from SMF 2.0 that contains BBCodes created with the BBCode With Style mod the Quick Edit option should be used and the names of the mod-specific BBCode tags should be changed to the SMF 2.1 format (eg, img => bbcws_img, table => bbcws_table, tr => bbcws_tr, td => bbcws_td, etc).



Description:
Adds the option to use classes and styles in hr, img, list, and table tags and adds two new tags.

New optional attributes of style:
- style, whose values, in double quotes, are inline rules.
- class, whose values, in double quotes, are names of classes.

These attributes are added to the following BBC tags (default BBCode tag name -> mod BBCode tag name):
- Horizontal rule (hr -> bbcws_hr).
- Image (img -> bbcws_img).
- List (list -> bbcws_list, li ->bbcws_li).
- Table (table ->bbcws_table, tr -> bbcws_tr, td -> bbcws_td).

Mod BBCode tags with optional attributes:
- bbcsw_hr: Add styles to horizontal rule.
   Example:  [bbcws_hr style="rule:1; rule:2;"]

- bbcws_img:
  rotateangle, rotatebgcolor. Rotate an image with a given angle in degree and using a background color for the uncovered zone after the rotation.
  Default value is 0 for rotateangle and black for rotatebgcolor. Values without quotes.
  Also add styles to images.
  The background color is an hexadecimal with 3 or 6 digits (#rgb or #rrggbb), a RGB color (r,g,b) or a color name of these:
    aqua = #00ffff = #0ff = 0,255,255
    black = #000000 = #000 = 0,0,0
    blue = #0000ff = #00f = 0,0,255
    fuchsia = #ff00ff = #f0f = 255,0,255
    gray = #808080 = 128,128,128
    green = #008000 = 0,128,0
    lime = #00ff00 = #0f0 = 0,255,0
    maroon = #800000 = 128,0,0
    navy = #000080 = 0,0,128
    olive = #808000 = 128,128,0
    orange = #ffa500 = 255,165,0
    purple = #800080 = 128,0,128
    red = #ff0000 = #f00 = 255,0,0
    silver = #c0c0c0 = 192,192,192
    teal = #008080 = 0,128,128
    white = #ffffff = #fff = 255,255,255
    yellow = #ffff00 = #ff0 = 255,255,0
    If the color does not exist in the image and can not be added, the closest color is used.
  flip. Flip an image in a direction. Permitted values are: horizontal, vertical. Value without quotes.
  Example:  [bbcws_img rotateangle=degree rotatebgcolor=color flip=direction style="rule:1; rule:2;"]image[/bbcws_img]

- bbcws_table:
  border. Width (in pixels) of the double border around a table. Value without quotes.
  Example:  [bbcws_table border=number]table content[/bbcws_table]

- bbcws_tr: Add classes or styles to row.
  Example:  [bbcws_td class="class_name1 class_name2" style="rule:1; rule:2;"]table cell[/bbcws_td]

- bbcws_td:
  colspan, rowspan. Span columns and rows in a table cell. Value without quotes.  Also add styles to columns.
  Example:  [bbcws_td colspan=number rowspan=number style="rule:1; rule:2;"]table cell[/bbcws_td]

New BBC tags:
- Paragraph style (div): Adds classes or styles to one or more paragraphs.
   Example:  [bbcws_div class="class_name1 class_name2" style="rule:1; rule:2;"]paragraph with style[/bbcws_div]

- Character style (span): Adds classes or styles to characters/text within a paragraph.
   Example:  [bbcws_span class="class_name1 class_name2" style="rule:1; rule:2;"]text with style[/bbcws_span]

Custom buttons are added to the editor toolbar for each of the BBCode tags above.

Release History:
v1.0 - 14-Sep-24
o Initial Release

License
Copyright (c) 2010-2020 davidhs, 2024 Kathy Leslie
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
BBCode_With_Style_SMF2.1-v1.0.zip
15.24 KB v1.0 2.1.4
Manual installation info
You have to register or login to be able to leave a review
There are currently no reviews on this customization
Advertisement: