The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Better Spoiler bb code Details »» | |||||||||||||||||||||||||
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!'; }" /> <div id="show" style="background-image:url(http://img37.picoodle.com/img/img37/5/11/7/f_backgroundm_872c796.png); display: none; background-color:transparent; background-repeat:repeat; margin: 0px;border-style:solid;border-width:1px; padding: 4px; width:98%"> {param}</div> <div id="hide"></div></div></div> 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!'; }" /> <div id="show" style="background-image:url(http://img37.picoodle.com/img/img37/5/11/7/f_backgroundm_872c796.png); display: none; background-color:transparent; background-repeat:repeat; margin: 0px;border-style:solid;border-width:1px; padding: 4px; width:98%"> {param}</div> <div id="hide"></div></div></div> Use Option: Yes Screenshot Show Your Support
|
Comments |
#12
|
|||
|
|||
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. |
#13
|
|||
|
|||
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 |
#14
|
|||
|
|||
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 != '') { this.parentNode.parentNode.getElementsByTagName('div')['show'].style.display = ''; this.parentNode.parentNode.getElementsByTagName('div')['hide'].style.display = 'none'; this.innerText = ''; } else { this.parentNode.parentNode.getElementsByTagName('div')['show'].style.display = 'none'; this.parentNode.parentNode.getElementsByTagName('div')['hide'].style.display = ''; this.innerText = ''; }" /> <div id="show" style="display: none; background-color:transparent; background-repeat:repeat; margin: 0px;border-style:solid;border-width:1px; padding: 4px; width:98%"> {param}</div> <div id="hide"></div></div></div> use option: On |
#15
|
|||
|
|||
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 |
#16
|
||||
|
||||
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 |
#17
|
|||
|
|||
its ok i have sorted it now and got it working
|
#18
|
||||
|
||||
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.
|
#19
|
|||
|
|||
Quote:
|
#20
|
|||
|
|||
works nicely
i customized it for my site |
#21
|
||||
|
||||
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? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|