Author Topic: Expanding & Collapsing Off-Topic Tag v3.2a  (Read 2359 times)

dougiefresh

  • Adminstrator
  • Expert Member
  • *****
  • Posts: 261
Expanding & Collapsing Off-Topic Tag v3.2a
« on: Nov 27, 2014, 11:09:53 AM »

EXPANDING & COLLAPSING OFFTOPIC TAG v3.2
By Dougiefresh -> Link to Mod


Notice
This mod is no longer being supported.  You are strongly encouraged to use Yet Another Spoiler Mod instead...

Introduction
This modification adds a BBCode to the forum that allows the post author to hide a offtopic in the post, which is clickable to display it to the user.

This BBCode takes the form:
Code: [Select]
[nobbc]
[offtopic]{content}[/offtopic]
[offtopic text=Blah]{content}[/offtopic]
[offtopic quote="Blah"]{content}[/offtopic]
[/nobbc]
Note that quotes are required for the quote parameter, but not for the text parameter.  These forms have no issues with other block-level tags inside the offtopic tag.

This BBCode can also take the following form:
Code: [Select]
[nobbc]
[offtopic=Some Text]{content goes here}[/offtopic]
[/nobbc]
Note that, for this form, other block-level bbcode tags are not parsed inside this offtopic tags form.

NEW FOR 2.1:
Version 2.1 introduces two optional parameters for use:
o hide parameter indicates the text to replace the default "hide" string
o show parameter indicates the text to replace the default "show" string.

Admin Settings
This BBCode may be disabled by going into the Admin => Forum => Posts and Topics => Bulletin Board Code and unchecking the bbcodes you don't want to use.  You may also be uninstall this mod in order to disable it.

Compatibility Notes
This mod was tested on SMF 2.0.9, but should work on SMF 2.1 Beta 1, as well as SMF 2.0 and up.  SMF 1.x is not and will not be supported.

Changelog
The changelog has been removed and can be seen at XPtsp.com.

License
Quote
Copyright (c) 2015 - 2017, Douglas Orend
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.
« Last Edit: Jan 09, 2016, 10:17:40 AM by dougiefresh »

dougiefresh

  • Adminstrator
  • Expert Member
  • *****
  • Posts: 261
Re: Expanding & Collapsing Off-Topic Tag v2.3
« Reply #1 on: Nov 29, 2014, 03:28:01 PM »

Below are some preview images of what the mod looks like when being used

Download Mod


FileName: Expandable_OffTopic_BBCode_v3.2a.zip
Size: 8 kb (8,629 bytes)
MD5: b4057c5a2c98003144489498daae0c9e
Built: Dec 30, 2017, 10:42:31 AM
Downloaded 70 times

Changelog

v3.2a - November 25th, 2017
o Altered readme.txt to reflect that mod is no longer being supported.

Uploaded v3.2 - February 10th, 2017
o Added code so that the border underneath the "OffTopic" text could be removed.
o Fixed code where guests are not allowed to view OffTopics, but could anyways.
o Fixed code where guests were allowed to view OffTopics, but couldn't.

Uploaded v3.1 - April 4th, 2016
o Added Spanish Latin translation by Rock Lee [BC].

Uploaded v3.0 - Febrary 13th, 2016
o Added "expand" parameter to indicate whether or not the offtopic is expanded by default.
o Rewrote offtopic validation function to support new parameter.

Uploaded v2.3 - December 30th, 2015
o Fixed minor visual issue with Offtopic tag without parameters.

Uploaded v2.2 - November 19th, 2015
o Fixed issue where bbcode button outputted wrong bbcode when pressed.

Uploaded v2.1 - November 18th, 2015
o Added "show" and "hide" parameters to replace default "show"/"hide" text with user specified text.

Uploaded v2.0 - November 14th, 2015
o Changed all spoiler tags to block-level tags.
o Changed bbcode tag types so that a validation function can be used to parse content inside tags.
o Changed the [spoiler=text]{content}[/spoiler] form to not parse other block-level tags.
o Moved all language modifications to the end of the language file.

Uploaded v1.8 - July 20th, 2015
o Fixed missing BBCode button in editor for SMF 2.1 Beta 1.
o Remade Off-topic bbcode button with different font.

Uploaded v1.7 - April 4th, 2015
o Updated for SMF 2.1 Beta 1

Uploaded v1.6 - January 16th, 2015
o License change to Simplified BSD.  No functionality change.

Uploaded v1.5 - December 30th, 2014
o language.xml file renamed to english.xml
o Added new form of the bbcode: [offtopic=Some Text]Content Here[/offtopic]
o Changed bbcode definition code based on bbcodes defined in Sources/Subs.php...

Uploaded v1.4 - December 29th, 2014
o Fixed image install locations within package-info.xml.

Uploaded v1.3 - December 10th, 2014
o Added button for the bbcode.

Uploaded v1.2 - December 6th, 2014
o Added code to disable creation of the validation code if BBCode is disabled.

Uploaded v1.1 - December 5th, 2014
o Made the "show" and "hide" strings localizable.
o Modified code to replace the strings once per page load, instead of every use of the BBCode.

Uploaded v1.0 - November 22th, 2014
o Initial Release of the mod

Translations

Quote
$txt['offtopic'] = "Off-Topic";
$txt['debug_hide'] = 'hide';
« Last Edit: Oct 29, 2016, 08:00:31 PM by dougiefresh »