The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Custom Title Spoiler Button Details »» | |||||||||||||||||||||||||||||||
I have a Spoiler Tag Feature at my site that allows for a spoiler with a custom button title to be initially seen (great if you want to hint what is hidden inside).
I don't see anything exactly the same here...although some are similar... & have seen many requests for other spoiler ideas, so.... I thought I might share. Please be kind as this is my first shared hack. Update: Spoilers still work in version 4.x.x (including suites). Spoilers may be used as intended, in all Blog posts, forum posts, & published article content (CMS) to hide hints/cheats. I will not support it anywhere else outside of posting areas. It's real easy. Just log into the AdminCP=>Custom BBCodes=>Add New BB Code Then do this: Title: Spoiler BB Code Tag Name: Spoiler Replacement: Code:
<div style="margin:20px; margin-top:5px"> <div class="smallfont" style="margin-bottom:2px; width:852; height:26"><right><font color="red"><b> </b></font></right> <input type="button" value="Spoiler about {option}" style="font-size:10px;margin:0px;padding:0px;" onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = '{option}'; }"> </div> <div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;"> <div style="display: none;"> {param} </div> </div> </div> description: Creates a button that hides/shows spoiler messages. use {option}: Click "Yes" (Note: some have found they need to set this option to "No" due to personal styling, but in most cases it should be "Yes"). add the path to your "spoiler" icon The image would go in your forums images/editor directory. (Feel free to use the icon I added at the bottom of this post.. just right click on it to download it to your computer) Remove tag if empty: Click Yes ...leave the rest at "No" click "save" button & that's it! >>LIVE EXAMPLE<< (You can test there without signing up, if you want to see how it works, but also not this is the newer "Smooth Version" the "Box Version" can be seen in the screen shots below). The code will then be: [spoiler="Button Title Here"]Hidden Content Here...[/spoiler] This also works to nested spoilers as well! Below there is an icon to use as well. Just add your image of choice to your path... /images/editor directory. ENJOY! Please Note: if for any reason this spoiler system breaks when converting to 4.0 upgrade. Just to BB Code manager & delete it, go through the process of adding it again, as given above. Doing this will not make you lose any forum content as long as you use the the same code (i.e. if you modified the code I gave you, then you will have to do the same again for it to work as you want). Doing this will force the new version to read the bbcode properly. It also works in CMS, but I personally am not using it right now, as it's not relevant to my site. So let me know if you have any problems, & I'll test. We have a smooth, "NO BOX" version HERE that also works for all 3X versions. Screenshots
Show Your Support
|
Благодарность от: | ||
Panzer Max |
Comments |
#22
|
|||
|
|||
If I enable option yes then the old post with spoilers will not work. how do i fix this?
|
#23
|
||||
|
||||
Can you share the old code for your spoilers. I don't know what you used. Just PM me about it.
|
#24
|
|||
|
|||
Thanks. Works well with 3.8.2
|
#25
|
|||
|
|||
Love it!!! Installed!!
Any chance of using {username} in title? So that each time a thread starter is displayed it is personalized by the member viewing it with their user name? If so send the update alert I will tag too! TSG! |
#26
|
||||
|
||||
Will this work with vB4?
|
#27
|
|||
|
|||
should apply to this one as well;
XSS [spoiler=xss';alert('XSS');var y=']test[/spoiler] click button twice |
#28
|
|||
|
|||
there's diffence if no title...& with title??
|
#29
|
|||
|
|||
anyone knows how to make spoiler work with rss?
|
#30
|
||||
|
||||
Not really, This content was created for direct posting. Sorry.
Update: Spoilers still work in version 4.2.x, Tested in the Suites as well. Spoilers may be used as intended, in all Blog posts, forum posts, & published article content (CMS). I will update the main content pages when 4.2.x becomes available in the BB CODE updates section. |
#31
|
||||
|
||||
Ok, installed but a slight problem with the look. I've edited the code from border: 1px inset to border: 0px and that works (see pic Unhidden) but the hidden pic still shows the long grey bar.
How can I remove this? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|