REGISTER or LOGIN to have the annoying ads removed.
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Spoiler mycode
#1
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.
Reply
#2
Here is a spoiler test:


Mirror mirror on the wall:
Reply
#3

Test
Reply
#4
Reply
#5
i want to test xD
Reply
#6
i wanna test too xD

Reply
#7
Reply
#8
Reply
#9
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
Reply
#10
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
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  MyCode Issues / Help / Guidance coolbud012 0 731 Oct 22, 2013, 08:55 AM
Last Post: coolbud012
  Using some MyCode in [CODE] boxes. Tekno Venus 2 1,112 Aug 26, 2012, 04:19 PM
Last Post: Tekno Venus
  How to add mycode for a click to PM hostpro 0 859 Mar 24, 2012, 04:32 PM
Last Post: hostpro
  Spoiler Plugin [With Button[ S.T.A.R.S 2 2,067 Nov 19, 2011, 03:00 AM
Last Post: mybbk
  Mycode privileges ? i3urn 3 1,516 Jun 27, 2011, 08:34 AM
Last Post: Oliver Evans

Forum Jump:


Users browsing this thread: 2 Guest(s)