• Extensions
  • Flarumite Simple Spoilers - Pure HTML5 and CSS

Simple Spoilers

MIT License Latest Stable Version Total Downloads Donate

  • HTML5 only spoilers - no JS needed!
  • Works with FriendsOfFlarum/nightmode
  • Integrates with standard Flarum BBCode
  • Supports all modern browsers (96.26% of web traffic)

A Flarum extension. Adds simple spoilers to your forum. Uses pure HTML and CSS with absolutely no JavaScript.

Supports FriendsOfFlarum's Night Mode.

Browser support

As this extension uses the <details> and <summary> elements, this extension is compatible with all modern browsers with 96.26% support for web traffic.

Installation

Install with composer:

composer require flarumite/simple-spoilers:"*"

To update:

composer update flarumite/simple-spoilers:"*"
php flarum cache:clear

Usage

Spoilers are available in two versions: normal and customised title. The normal spoilers use the values in the locale file as titles (button text), whereas the customised title version allows users to add their own title to replace the localised versions.

Normal spoiler

[spoiler]
Some content
[/spoiler]

Spoiler with custom title

[spoiler title=My cool title]
Some content
[/spoiler]

Spoiler-ception!

Putting spoilers inside spoilers even works!

[spoiler]
test
[spoiler]
embedded
[spoiler]
embedded
[spoiler]
embedded
[/spoiler]
[/spoiler]
[/spoiler]
[/spoiler]

Links

    This needs to be, viewable to members that have X amount of posts to view spoiler integrated.

      katos Trust levels will be expanded to handle more stuff than just adding groups, but it still depends on permissions introduced by extensions.

      a month later

      Nice extension! Is an update planned for the latest beta 16 release?

        TheDcoder that Composer requirement means it can be installed (but not necessarily tested compatible) with any version >=0.1.0-beta.15 and <0.2.0

        See https://getcomposer.org/doc/articles/versions.md#caret-version-range- for an in-depth explanation of all the version/requirements mechanics.

        Because not all extensions are affected by breaking changes, the minimal requirements do not need to match with the latest Flarum release. Although it's indeed a good indicator for more complex extensions which will most certainly be affected by breaking changes.

        TheDcoder

        Clark is completely right -- the ext is compatible with B15 and B16, and I didn't want to "take it away" from B15 users still waiting for updates for their other exts.

        2 months later

        Flarum stable compatible? Not listed in extiverse

          1.0.0

          Changed

          • Marked as compatible with Flarum Stable 1.0

          Updating

          composer update flarumite/simple-spoilers:"*"
          php flarum cache:clear
          4 months later