MyBB Central
Spoiler mycode - Printable Version

+- MyBB Central (http://www.mybbcentral.com)
+-- Forum: Mybb Central General Discussions (http://www.mybbcentral.com/forum-1.html)
+--- Forum: Mybb General Support Help (http://www.mybbcentral.com/forum-6.html)
+--- Thread: Spoiler mycode (/thread-2.html)

Pages: 1 2


Spoiler mycode - labrocca - Oct 15, 2006

Ask and you shall recieve.

Add this to your themes additional css:

Code:
a.spoiler, a.spoiler:visited, a.spoiler:active, a.spoiler:hover {color:#000; background:#fff; border: 1px dotted #ccc; text-decoration:none;}
a.spoiler span {display:none;}
a.spoiler:hover {border: 1px dotted #cccccc;}
a.spoiler:hover span {display:inline; font-weight:normal;}

Then create a new custom mycode inside admincp.

Regular Expression:
Code:
\[spoiler\](.*?)\[/spoiler\]

Replacement:
Code:
<a href="#" class="spoiler">Spoiler: <span>$1</span></a>

Change to suit your needs.  Works in IE, FF, and Opera.  

You can see it in action here:

http://www.pokemonboard.com/showthread.php?tid=150
Please let me know if you have any problems.


RE: Spoiler mycode - labrocca - Oct 15, 2006

Here is a spoiler test:


Mirror mirror on the wall:



RE: Spoiler mycode - labrocca - Oct 18, 2006


Test


RE: Spoiler mycode - CiLiBi18 - Nov 01, 2006




RE: Spoiler mycode - XxAnimusxX - Dec 29, 2006

i want to test xD



RE: Spoiler mycode - banana29 - Nov 09, 2007

i wanna test too xD




RE: Spoiler mycode - splatzone - Dec 18, 2007




RE: Spoiler mycode - slappymancuso - Jan 20, 2008




RE: Spoiler mycode - exarchate - Feb 26, 2008

thx labrocca, till now, i think i got all what i need here.
thanks for spending your time for these stuff.
keep up the good work


RE: Spoiler mycode - exarchate - Feb 26, 2008

hi, can we make a show or hide button instead hover the link, because users have to hover to the spoiler content or it will disappear.
thx in advance