user_mobilelogo

This very simple plugin lets you include a "spoiler" block of text into any Joomla article. The "spoiler" can show or hide with a mouse click on the spoiler's header.

The plugin features:

  • possibility to create nested spoilers (see the example below), as many nested spoilers as you like;
  • user-defined spoiler header label, separate for the opened and closed state of the spoiler;
  • spoiler header background color and transparency (customisable in plugin settings);
  • spoiler border color and transparency (customisable in plugin settings);
  • show/hide the twister in the spoiler header (customisable in plugin settings).

spoiler alert! - click me to see the spoiler

click to hide text

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

spoilers can be nested

the "close me" text can be customised too

Nested spoiler text goes here

yes - as many nested spoilers...

click to hide text

...as you like!


Current version 1.3.

New in version 1.3:
+ BUG FIX: The bug when spoilers would not work on jumbo-extra-large articles is fixed now. Thanks to Ross Finch for reporting the bug.

New in version 1.2:
+ BUG FIX: Spoilers occasionally not working on the pages generated with multiple plugin instances. Thanks to Ross Finch for reporting the bug.
+ New feature: Spoilers with the content available for the registered users only. See the details below.


Plugin installation

Once you have downloaded the plugin package (an ordinary .zip file), install it through the standard Joomla! extension installer in the administrative back-office of your Joomla! site, go to Extensions-Plugins menu and enable the "Content - Spoiler html for articles" plugin.

The plugin is ready to use.


How to use the plugin in the article

All you need to do is to put the following markup into your Joomla! article:

{spoiler}text inside the spoiler{/spoiler}

and you'll get this:

 

 

text inside the spoiler

Now let's add the labels for the closed and open state of the spoiler, preceding those with the spoiler ID - that's the correct order of the spoiler parameters, the spoiler ID, closed state label, open state label:

{spoiler spoilerID,Click me to open,Click me to close}text inside the spoiler{/spoiler}

and you'll get this:

Click me to open

Click me to close

text inside the spoiler

spoilerID can be any alphanumerical identifier, but make sure it is unique within the article, so that all the spoilers in the article work properly.

New in version 1.2: You can make the content of the spoiler available for the registered users only. To do so, add the third parameter to the spoiler, setting it to "true" (no quotes). Like this:

{spoiler}spoilerID,Click me to open,Click me to close,true{/spoiler}

Then, instead of the content of the spoiler, which, in this case, is "Text inside the protected spoiler", your guest users will see this:

Registered users only

I said - registered users only!

Only registered users can see this content.

Note that you can alter the 'registered users only' message, font style and color on the 'Advanced' tab of the plugin settings in the back office.


Configurable parameters

In the administrative back-office of your site, go to Extensions-Plugins-Content-Content - Spoiler html for articles and configure the plugin to your liking.

You can choose color and transparency of the spoiler's header, color and transparency of the spoiler's border, and whether to show the twister or not next to the spoiler's label. Also, starting version 1.2, you can set up the message to be displayed to guests in the 'registered users only' spoilers.

Stay tuned, for more configurable parameters will be added soon for advanced flexibility.


Support and suggestions

Please contact This email address is being protected from spambots. You need JavaScript enabled to view it. for support or suggestions for further development you may have.


Download

Use this direct link to download the latest stable version: ContentSpoiler plugin v1.3 for Joomla!


Thank you for reading this far. You can say thank$ to me too!

The plugin is absolutely free, but if you feel like buying me a beer (or a meal), you can do it here...