![]() |
Spoiler Tag : Show/Hide
A CSS/Javascript based spoiler tag for vB 3.5.x (but I think it must work with earlier versions)
Just follow the instructions below or in the .zip file. I hope you like my first modification! Instructions Step 1. Copy the following into the additional CSS definitions (Admin CP > Styles & Templates > Style Manager > All Style Options>Additional CSS definitions) and paste it into the lower box. Code:
.pre-spoiler { Now click save and go to the page to add a new BB Code (Admin CP> Custom BB Codes > Add New BB Code) and enter the following: Title: Spoiler Tag: spoiler Replacement: Code:
<div> Description: Hides text Use {option}: No Button Image: Leave empty Click save and you are done! Known bugs: You can read the spoiler in the "Thread Preview". FAQ Q: I want to change the color that the spoiler tag uses! How? A: If you know CSS it is all controlled in the CSS definitions. |
No problems here.
/me clicks install |
ok, I take that back. Whan you do a thread preview, it shows the contents of the spoiler.
|
Do you mean the "Hover Preview" from the Treads list? I didn't think of that... If somebody know how to do it... Please say =)
|
Quote:
|
Very nice spoiler hack!
|
Please change the BB Code with this! Now it works great! (except the Preview, Sorry Stangsta, I will try to fix that)
Code:
<div> Hack Updated with the new code! |
excellent! thank you soo much!
|
Quote:
|
What do you mean dirtycrow? It's all in english (well, except my posts that are in BAD english).. But the only "English" words that are in the hack are:
- Spoiler - Show - Hide Edit: Sorry dirtycrow... I've just edited my post... It's all in english now... But again, there're only 2 words to change... Sorry!! |
i copied the code in post number 7 and now i don't have show and hide but "mostar" and "Ocultar"
|
Sorry again... Now it's all in English... (i forgot to change that words because my forum it's in spanish :P)
|
ElForro, thank you so much! awesome!
|
Nice! I just installed!
To keep the spoiler out of the hover, I'm advising my users to have at least three lines of text before putting in the spoiler (may it be words, dashes or whatever). |
Thanks, I've installed this! :)
|
Installed, love it :)
|
Installed, thanks.
Was there ever a way to make it not show in thread preview? |
GSX-Racing... I really don't know... But if someone does please help here so we can make this a better spoiler tag =)
|
Yeah, that would be sweet.
I tried just putting a period on the first three lines but that didn't work. I guess you have to put the 150 characters (or whatever thread preview is set to) in order to hid the spoiler info. |
The problem with previous versions of this is it didn't work if Firefox, does this work with all browsers?
|
This is my first mod, no previous versions...
This works with (tested)... MAC: - Safari - Firefox - Opera - Camino Windows: - Firefox - Internet Explorer - Opera |
looking good. thanks.
|
As I run a board that centers around anime and games, this was essential to not spoil major details.
Great mod. *clicks install* |
For those of us too lazy to make a button, here is one. It's nothing pretty, just something for you to use, maybe I will make a better one later :-)
|
I've spent quite a bit of time mucking around, and I've come up with the following changes.
I've embedded the CSS within the replacement, so you don't need to go muck around with your styles. I've also modified the CSS to be a bit more generic - and I've fixed it so that the spoiler doesn't stretch across the entire post. It is as big as the text between the tags. Code:
<table><tr><td> Code:
<span> EDIT: I've cleaned up the code a bit - the toggle should now work in Safari. |
Quote:
Where do these codes get put? In the BBCode? |
Yeah, it goes in the 'replacement' field.
|
Quote:
Wow, this is really nice! I appreciate you sharing. I especially like the one that can be used "inline." However, the dashed lines make it a bit hard to read. Previously I was using this: HTML Code:
<div style="margin:5px 20px 20px 20px"> That would be great. |
Thanks for this, it looks great!
|
Quote:
|
Quote:
What I was looking to do however was gain this more subtle "recessed" look... this is what my current spoiler code (pasted above) gives me, but the text can't go inline: http://homepage.mac.com/joshr/trl/spoiler.jpg Is something like that possible? The looks of that, but the inline capabilities of yours? |
I created the following at Tralala's request (I'm not sure if it's quite what he's looking for), but if anyone else is interested, here it is:
Code:
<span> |
It would be better if this was made to use the stylevar commands so people wouldn't need to customise the colours. Some of us have multiple styles.
|
Quote:
|
Quote:
|
Quote:
|
Quote:
Code:
<span> |
Excellent, just what the doctor ordered. So simple, yet so elusive (to me.) Thanks again, thisgeek.
|
Thank you all! And sorry about the little problems like the CSS and "Preview"... I'm just an amateur... =)
|
Thanks to you for it initially :D
You can't really do anything about the preview (IMO) since it's controlled by the board. The way around it is to change the amount of characters displayed in the vb option: "Length of Thread Preview Text" located under the "Forum Display Options" group. Or: The person posting could put their spoiler a bit further in to the post so that it's not snagged into the preview text. |
All times are GMT. The time now is 04:54 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:
|