Author Topic: [A] Yet Another Spoiler Mod  (Read 92 times)

dougiefresh

  • Adminstrator
  • Expert Member
  • *****
  • Posts: 253
[A] Yet Another Spoiler Mod
« on: Dec 11, 2017, 11:08:13 AM »

YET ANOTHER SPOILER MOD v1.1
By Dougiefresh -> Link to Mod


Introduction
This modification adds 3 BBCodes to the forum: spoiler, changelog and offtopic.  These bbcodes allows the post author to hide content in the post, which is clickable to display it to the user.

These BBCode takes the forms:
Code: [Select]
[nobbc]
[nobbc][spoiler]{content}[/spoiler][/nobbc]
[nobbc][spoiler {params}]{content}[/spoiler][/nobbc]
[nobbc][spoiler=Some Text]{content goes here}[/spoiler][/nobbc]
[/nobbc]

The {params} section may be any of the following parameters:
o text - Replaces default "Spoiler" text in the header.
o quote - Text that follows the "Spoiler" text in the header.  Must be in quotes.
o show - Replaces default "Show" text in the header.
o hide - Replaces default "Hide" text in the header.
o guests - Flag to show spoiler to guests or not.  May be n, no, false, y, yes, or true.
o log - Flag to enable/disable logging of who viewed the spoiler.
o log_id - DO NOT EDIT!  Automatically replaces log parameter with number of spoiler we are tracking.

Admin Settings
Each bbcode has settings in Admin => Configuration => Modification Settings => YASM:
o {tag_name} style to use:
o Replace button text "{tag_name}" with:
o Replace button text "Show" with:
o Replace button text "Hide" with:
o Default to expanded status?
o Disable {tag_name} for guests globally?
o Disable line beneath {tag_name} text?
o Show which members viewed the {tag_name}?
o Number of members to show that viewed the {tag_name}

These BBCodes 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 them.

Mod Install Notes
This mod REPLACES and expands upon the functionality in the following mods:
o Expanding & Collapsing Spoiler Tag
o Expanding & Collapsing Off-Topic Tag
o Expanding & Collapsing Spoiler Tag

These mods NEED TO BE removed prior to installation of this mod, as the installer will not permit this mod to be installed alongside those mods!  I will not be supporting those mods once this mod is approved!

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

Related Discussions
o Kortal's request for spoiler redesign
o WellWisher's changes to the design
o Spoilers
o [FREE/PAID] - Spoiler tag with user record
o [FREE] Spoiler Mod Tweaks

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

License
Quote
Copyright (c) 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.

dougiefresh

  • Adminstrator
  • Expert Member
  • *****
  • Posts: 253
Re: [A] Yet Another Spoiler Mod
« Reply #1 on: Dec 11, 2017, 11:08:53 AM »

Download Mod


FileName: Yet_Another_Spoiler_Mod_v1.1.zip
Size: 17 kb (17,165 bytes)
MD5: 894d9d4f7b2fb1703ffa9a78ae59be11
Built: Dec 25, 2017, 09:58:27 AM
Downloaded 4 times

Changelog

Uploaded v1.1 - December 23rd, 2017
o Fixed issue showing/hiding proper links within the JavaScript code.
o Fixed database insertion issue within Subs-YASM.php code.

Uploaded v1.0.1 - December 17th, 2017
o Added forgotten Changelog and Off-Topic bbcode button images.
o Removed code to add Font-Awesome, since no portion is used by the mod.
o Added spoiler logging options and supporting code.
o Added automatic log ID adding to posts if logging is requested by OP.
o Fixed code so that spoiler contents aren't revealed to guests if so requested.
o Generalized configuration strings in language file, per SMF Customization Team.
o Added setting to limit logs retrieved to admin-set number of recent members.
o UNIMPLEMENTED: Added preparser for automatically adding log ID if logging is requested by admin.

Uploaded v1.0 - December 11th, 2017
o Initial Release of the mod