2010-05-25, 08:57 PM
(This post was last modified: 2010-05-25, 08:59 PM by afzulnizam.)
Title: Spoiler text
Short Description: Allow user to put text on value of the button.
Regular Expression:
Enabled? : Yes
Example code in post
[spoiler=You can put your txt here to show the spoiler]Something here[/spoiler=You can put your txt here to hide the spoiler]
Result:
- Code are valid the markup validity.
- If you looking for standard spoiler, you can use this code on Replacement box.
with this regular expression.
[spoiler]text here[/spoiler]
Thanks
Short Description: Allow user to put text on value of the button.
Regular Expression:
Quote:\[spoiler\=(.*?)](.*?)\[/spoiler\=(.*?)]Replacement:
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px"><input type="button" value="$1" style="width:auto;font-size:12px;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 = '$3'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = '$1'; }" />
</div>
<div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;">
<div style="display: none;">$2</div>
</div>
</div>
Enabled? : Yes
Example code in post
[spoiler=You can put your txt here to show the spoiler]Something here[/spoiler=You can put your txt here to hide the spoiler]
Result:
- Code are valid the markup validity.
- If you looking for standard spoiler, you can use this code on Replacement box.
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px"><input type="button" value="Show Spoiler" style="width:100px;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 Spoiler'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show Spoiler'; }" />
</div>
<div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;">
<div style="display: none;">$1</div>
</div>
</div>
with this regular expression.
Quote:\[spoiler\](.*?)\[/spoiler\]Example code in post
[spoiler]text here[/spoiler]
Thanks