dopetalk

Technology => SMF Forum Code Modifications => Topic started by: Chip on August 02, 2017, 08:56:39 PM

Title: Expanding & Collapsing Spoiler Tag
Post by: Chip on August 02, 2017, 08:56:39 PM
https://custom.simplemachines.org/mods/index.php?mod=3981

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

This 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.

Note that the form (#3) with the equal sign does not parse other block-level bbcode tags inside the spoiler.  Empty form or form with parameters does not have this restriction.

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.
Title: Re: Expanding & Collapsing Spoiler Tag
Post by: Anti-hero on August 04, 2017, 12:51:29 AM
Thought you were talking about the economy
Carry on
SimplePortal 2.3.6 © 2008-2014, SimplePortal