godkillah
07-14-2008, 10:00 PM
I have written a spoiler bbcode for vBdeals and i decided to also release it for other vB users to use.
it should work on any version.
Name: Spoiler bbcode
Example:to create a spoiler use:message
Description: This adds a spoiler bbtag to your forum familiar to the SMF spoiler tag,
spoiled messages are hidden with buttons, once the button it clicked the message shows/hides
Author: Godkillah
Copyright to: http://www.vbdeals.com
-----------------------------------
How to install?
Step 1.
Go to the 'Custom BB Codes' in the ACP and click 'Add New BB Code'
Step 2.
Set the Title to: Spoiler
Step 3.
Set the BB Code Tag Name to: spoiler
Step 4.
Set the Replacement to: <!--Vbdeals.com-->
<div class="spoiler"><script>
function showHide(what){
a=what.getElementsByTagName("div")[0];
if(a.style.display=='none'){
a.style.display='block';
}else{
a.style.display='none';
}}
</script>
<input type="button" onclick="showHide(this.parentNode)" value="Spoiler"><b><small>( Click to show/hide )</small></b><div style="display:none">{param}</div></div>
<!--Vbdeals.com-->
Step 3.
add a example and description if you like
Step 6.
Set all of the radio buttons to 'No'
Step 7.
press the save button
Congratulations, the spoiler bbcode has now been installed
it should work on any version.
Name: Spoiler bbcode
Example:to create a spoiler use:message
Description: This adds a spoiler bbtag to your forum familiar to the SMF spoiler tag,
spoiled messages are hidden with buttons, once the button it clicked the message shows/hides
Author: Godkillah
Copyright to: http://www.vbdeals.com
-----------------------------------
How to install?
Step 1.
Go to the 'Custom BB Codes' in the ACP and click 'Add New BB Code'
Step 2.
Set the Title to: Spoiler
Step 3.
Set the BB Code Tag Name to: spoiler
Step 4.
Set the Replacement to: <!--Vbdeals.com-->
<div class="spoiler"><script>
function showHide(what){
a=what.getElementsByTagName("div")[0];
if(a.style.display=='none'){
a.style.display='block';
}else{
a.style.display='none';
}}
</script>
<input type="button" onclick="showHide(this.parentNode)" value="Spoiler"><b><small>( Click to show/hide )</small></b><div style="display:none">{param}</div></div>
<!--Vbdeals.com-->
Step 3.
add a example and description if you like
Step 6.
Set all of the radio buttons to 'No'
Step 7.
press the save button
Congratulations, the spoiler bbcode has now been installed