![]() |
BBcode Mouse Over Spoiler Tag
Im not a huge fan of all the spoiler tags that require buttons to activate the hidden text, nor can they be used within a paragraph of text multiple times, so I wrote one that you can place the tags around the text within a paragraph (multiple times if you wish) and all one has to do is MOUSE OVER each one to reviel the hidden text. The reason I say "each one" is that you can have a review with multiple spoiler tags within the review and each one is activated seperately upon mouse over.
2 Simple Steps Step 1 - Add new BB Code as follows: Title: Spoiler Tag: spoiler Replacement: Code:
<span class="spoiler" onmouseover="this.style.color='#FFFFFF';" onmouseout="this.style.color=this.style.backgroundColor='#000000'">{param}</span> Code:
[spoiler]Stuff goes here[/spoiler] Step 2 - Add an Additional CSS Definition Edit the Style(s) that you wish to apply this too .... (Style Manager >> All Style Options) scroll down towards the very bottom of the Options and you will see an area for "Additional CSS Definitions " Enter the below code to the end of the Additional CSS Definitions Code:
.spoiler |
Nice One
|
Quote:
|
Could make the replacement as it is shown below, to give users more warning.
I know people can just add this if they want, but it might make life easier for some users. Code:
<font color="#FF0000"><b>Warning! Spoiler Below:</b></font><br><span class="spoiler" onmouseover="this.style.color='#FFFFFF';" onmouseout="this.style.color=this.style.backgroundColor='#000000'">{param}</span> |
Quote:
|
I dont get it...
|
Quote:
|
Great job! Worked smooth!
|
bobster65 install:up:
|
Thanks for doing this. I prefer this mouse-over method to the other clicking and dragging ones.
Following on Liberation's suggestion, I've edited my Replacement text to remove the line break so I could embed multiple Spoiler tags in one paragraph, yet still alert the user to a Spoiler. It looks like this: [Spoiler:] and spoiler stuff to follow on the same line. Code:
<b>[<i>Spoiler:</i>]</b> <span class="spoiler" onmouseover="this.style.color='#FFFFFF';" onmouseout="this.style.color=this.style.backgroundColor='#000000'">Stuff goes here</span> |
Simple, easy install, very effective. Thanks!
|
ONly effective with black text though, isn't it? Won't work on dark styles as it is or if someone has an option of light and dark styles for their members.
|
Quote:
|
Just some additions I did to make this code more fun, also solves problems like bgcolours, text colours, skins, etc. Thought I'd share it cause I loved the original code this thread provided.
Code:
<table border bgcolor="yellow"><tr><td><font size= 3><font color="red"><b>Spoiler Alert: </b></font><font color="yellow"><span class="spoiler" onmouseover="this.style.color='#000000';" onmouseout="this.style.color=this.style.backgroundColor='#FFFF00'">{param}</span></font></tr></table> Code:
.spoiler https://vborg.vbsupport.ru/external/2007/10/29.jpg |
Dude... remove that second picture, it's offensive.
|
Hardly offensive but i won't argue, done
|
Quote:
|
Quote:
|
Quote:
|
This works well with 3.7 as well. Just so everyone is aware. ;)
|
All times are GMT. The time now is 02:35 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|