theFM
09-14-2009, 10:00 PM
I have a spoiler Feature at my site that allows for a custom button title to be initially seen ( great if you wnat to hint what is hidden inside)l
I don't see anything exactly the same here...although some are simular... & have seen many requests for other spoiler ideas, so.... I thought I might share. Please be kind as this is my first shared hack.
It's real easy. Just log into the AdminCP=>Custom BBCodes=>Add New BB Code
Then do this:
Title: Spoiler Tag
BB Code Tag Name: Spoiler tag
Replacement:
<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>
Example: Hidden Text Here
description: Makes a spoiler BBcode , just as any ordinary bbcode
use {option}: Click No
..leave the rest at "No"
click "save" button & that is it!
The code will then be: Hidden Text Here
Then Put
<style>
.spoiler div{
border:ridge;
border-bottom-color:#999999;
border-top-color:#999999;
border-left-color:#999999;
border-right-color:#999999;
border-bottom-width:thin;
border-top-width:thin;
border-left-width:thin;
border-right-width:thin;
}
</style>
In Your Main Template Editing Page in Your Extra CSS Coloumn
And you can see a different spoiler code being added.
Click on Install if Have Installed It , please tell me what should i do if it is not working correctly is in demo what i just did it in my forum is working now , so just added it here
Regards to ChopSuey for the demo
https://vborg.vbsupport.ru/external/2009/09/25.jpg
https://vborg.vbsupport.ru/external/2009/09/26.jpg
I don't see anything exactly the same here...although some are simular... & have seen many requests for other spoiler ideas, so.... I thought I might share. Please be kind as this is my first shared hack.
It's real easy. Just log into the AdminCP=>Custom BBCodes=>Add New BB Code
Then do this:
Title: Spoiler Tag
BB Code Tag Name: Spoiler tag
Replacement:
<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>
Example: Hidden Text Here
description: Makes a spoiler BBcode , just as any ordinary bbcode
use {option}: Click No
..leave the rest at "No"
click "save" button & that is it!
The code will then be: Hidden Text Here
Then Put
<style>
.spoiler div{
border:ridge;
border-bottom-color:#999999;
border-top-color:#999999;
border-left-color:#999999;
border-right-color:#999999;
border-bottom-width:thin;
border-top-width:thin;
border-left-width:thin;
border-right-width:thin;
}
</style>
In Your Main Template Editing Page in Your Extra CSS Coloumn
And you can see a different spoiler code being added.
Click on Install if Have Installed It , please tell me what should i do if it is not working correctly is in demo what i just did it in my forum is working now , so just added it here
Regards to ChopSuey for the demo
https://vborg.vbsupport.ru/external/2009/09/25.jpg
https://vborg.vbsupport.ru/external/2009/09/26.jpg