View Full Version : [Release] Spoiler Code
EyeCrave
07-08-2003, 10:00 PM
Author: Unknown or eyecravedvd
Description: Hides text that some readers may not want to read.
I'm not sure who did the first code, because I've seen it on a few sites, but if someone wants to step forward I'll give them the credit for sure.
I've redone this code to be completely CSS complient. There are no more tables.
It has only been tested with VB 3.0.3, but I'm sure it will work on older versions as well.
*Update - Error in CSS with width has been fixed. New text file.*
mymilkexpired
07-14-2003, 03:14 PM
Thats a pretty nifty hack.. i like that!
EyeCrave
07-15-2003, 03:48 AM
Thanks, I'm glad you like it. Comes in handy for my site. DVD & Movies... not too many people like having a movie spoiled.
Tony G
07-15-2003, 04:53 AM
Definently, love the spoiler tags. :)
SpeedStreet
07-15-2003, 11:48 AM
Nifty idea, but with VB3 this can be executed alot more efficiently.
Remember, the transparent color! This will alleviate the need to hard code something in, so that it can apply to multiple themes. Also, by using conditionals, you open yourself up to allowing Admins the right to view it without having to highlight the information.
Conditionals are your friend :D
imported_ogden2k
07-16-2003, 09:09 PM
There needs to be some specific rules here, everything HAS TO BE XHTML compliant! That code is not!
This is how it should be:
<blockquote>
<table bgcolor="#000000" cellspacing="0">
<tr>
<td><font color="#FFFFFF" size="1">Spoiler:</font>
<br /><font color="black">{param}</font>
</td>
</tr>
</table>
</blockquote>
There's a better way to do it with CSS if you want(XHTML compliant too):
In BB custom codes, add a new custom code:
<font color="#000000"><strong>Spoiler</strong>:</font>
<br /><font class="spoiler">{param}</font>
Under style manger, Additional CSS Definitions, add:
.spoiler {
color: #B7B7B7;
background: #B7B7B7;
}
EyeCrave
07-16-2003, 10:50 PM
There is no point in adding it to the CSS. That just means there's more to add. This is quick and gets the job done.
I added the "'s around the words, just to make it XHTML compliant.
Either way, it'll work fine.
imported_ogden2k
07-17-2003, 09:50 PM
Either it will work, but that's not the best way to it. Why not be compliant with the standards?
And CSS works much better, it's easier and less over hall.
Sephiroth 9999
07-19-2003, 08:58 AM
Sweet mod - I like it! :)
imported_MaDCaT75
07-21-2003, 08:11 PM
Ok but how can I choose different colors?
imported_ogden2k
07-21-2003, 11:18 PM
Ok but how can I choose different colors?
Try my mod, which is posted above. You can change the color tags however you want.
You can also do the same with the original posters too.
imported_MaDCaT75
07-21-2003, 11:27 PM
my code seems to be screwed up somehow.....
I did it exactly like you guys said. I tried adding double spoiler tags.
imported_MaDCaT75
07-22-2003, 02:35 AM
Nevermind I got it now :D
Skinny.Demon
10-03-2003, 05:34 PM
Am I missing something here. The txt file attached only explains how you add a bbcode function. What else do I need to do to get this working? For instance, where is all the code I need to change the colors etc?..
The Quibbler
10-12-2003, 01:52 AM
Great mod! Thanks you! :)
EyeCrave
10-03-2004, 01:11 PM
Text file has been updated in the first post. I have now made it fully CSS compatible. Please note, that it doesn't work properly in the admincp. It does work fine in the forums. For an example head here
http://www.eyecravedvd.com/forums/showthread.php?t=423
imported_khaleel
10-04-2004, 07:29 PM
Great hack goes well with my harry potter site im sure m1th will agree
Quelyn
03-10-2005, 12:39 PM
Finally this was exactly what I was looking for! Thanks so much
commTRU
08-21-2005, 07:48 PM
This is a great add-on, thanks :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.