![]() |
Better Spoiler bb code
Hello, i had to post this for a friend,
Enjoy it. Code made by ilT My site: http://somewhereyoubelong.com No Title Title: Spoiler (No Title) Tag: spoil Replacement: Code:
<div id="spoiler"><div><input type="button" value="Show Spoiler!" style="width:100px;font-size:12px;margin:10px;padding:0px;" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')['show'].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')['show'].style.display = ''; this.parentNode.parentNode.getElementsByTagName('div')['hide'].style.display = 'none'; this.innerText = ''; this.value = 'Hide Spoiler!'; } else { this.parentNode.parentNode.getElementsByTagName('div')['show'].style.display = 'none'; this.parentNode.parentNode.getElementsByTagName('div')['hide'].style.display = ''; this.innerText = ''; this.value = 'Show Spoiler!'; }" /> Use Option: No With Title Title: Spoiler (With Title) Tag: spoil Replacement: Code:
<div id="spoiler"><div><font size="4">{option}</font><input type="button" value="Show Spoiler!" style="width:100px;font-size:12px;margin-left:10px;margin-bottom:3px;padding:0px;" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')['show'].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')['show'].style.display = ''; this.parentNode.parentNode.getElementsByTagName('div')['hide'].style.display = 'none'; this.innerText = ''; this.value = 'Hide Spoiler!'; } else { this.parentNode.parentNode.getElementsByTagName('div')['show'].style.display = 'none'; this.parentNode.parentNode.getElementsByTagName('div')['hide'].style.display = ''; this.innerText = ''; this.value = 'Show Spoiler!'; }" /> Use Option: Yes Screenshot https://vborg.vbsupport.ru/external/2007/11/9.png |
thanks much - here is the image so people can upload it to their own server. Can the hidden text be viewed in archive mode?
|
Just change the image with anything you want...
All i can say is that it's pretty nasty from him to add such a background. |
no go error
Warning: sprintf() [function.sprintf]: Too few arguments in includes\class_bbcode.php on line 1115 |
I get this error also.
Other than that it looks good. |
Very, very cool. I like it. :)
[high]* projectego clicks install[/high] |
Does this function properly with multiple spoilers in a single post? I hacked my own board for somethign similar, but ran into that particular hurdle.
|
The problem with this is the spoilers are shown in the mouse over even since the replacement doesn't take effect until they view the thread.
|
can someone tweak this into so that we can use our own images?
like we can supply our own little thumbnail for each spoiler ? thanks |
Quote:
Just change picture link to you. |
So, this looks like something I want, but I don't know what to do with the code. Do I throw this into a template? Which one? Do I replace what's in the template or add to it? There aren't any instructions here that i can see...
Edit: Nevermind, I figured it out. |
Quote:
example [spoiler=http://vbulletin.com/car.gif]content content content about car[/spoiler] [spoiler=http://vbulletin.com/boat.gif]content content content about boat[/spoiler] and so on. also got this error: style is not "null" or an object |
added custom title on button:
add new BB code: Title: Spoiler with custom text on button Tag: spoiler2 Code:
<div id="spoiler"><div><input type="button" value="{option}" style="width:160px;font-size:12px;margin:10px;padding:0px;" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')['show'].style.display != '') use option: On |
ok i managed to figure out how to install but when i click on my custom button on the tool bar I a get a pop up same as insert an image
and when i post the what i have inserted into the box i cannot get the hid show to show up please can someone tell me what i have done wrong |
Quote:
in the title input , put something like "Spoiler" in the tag input, put something like "spoiler" so you will have the bbcode like this : [spoiler]text[/spoiler] in the replacement textarea, put the code of the spoiler that you can see on the thread and that's all :) |
its ok i have sorted it now and got it working
|
Multiple spoiler tags won't open after the first spoiler tag has been open regardless of whether they were used in the same post or not. This happens on IE/Safari browsers afaik.
|
Quote:
|
works nicely
i customized it for my site |
Found a bug!
Spoilers can be used to lure people to phishing sites. Allow me to demonstrate: If you have spoilers on your forum, post this and click on the spoiler. PHP Code:
Any suggestions on how to fix this lil bug? |
Bump.
This hack does make vB vulnerable to steal passwords via phishing. At the minimum, people should know that clicking on a spoiler button shouldn't open a new window. On a fast enough phishing server, the user may not even notice (assuming the phishing server served up already cached images). tick tock Also, you can't nest the spoilers in IE. If you put a spoiler inside of a spoiler it just craps out. |
Quote:
|
by far the best spoiler tag i've seen up to now...
thanx :D |
is this going to work with vb 4.0 ? :confused:
|
This doesn't work in Chrome. Any plans to fix that?
|
All times are GMT. The time now is 03:28 AM. |
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:
|