2012-10-10, 03:48 PM
Hi I have a spoiler code on my forum, which is just fine and working properly. But I need some fixation in it.
My spoiler code it:
Regular Expression:
Replacement:
It is working fine for this:
But I need to add a title tag in it. So that the below code will also work fine.
Like
Can anybody help please?
My spoiler code it:
Regular Expression:
\[spoiler\](.*?)\[/spoiler\]
Replacement:
<div style="padding: 3px; background-color: #FFFFFF; border: 1px solid #d8d8d8; font-size: 1em; width: 100%;" ><div style="text-transform: uppercase; border-bottom: 1px solid #CCCCCC; margin-bottom: 3px; font-size: 0.8em; font-weight: bold; display: block;"><span 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.innerHTML = '<b>Spoiler </b><a href=\'#\' onClick=\'return false;\'>Hide</a>'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerHTML = '<b>Spoiler </b><a href=\'#\' onClick=\'return false;\'>Show</a>'; }" /><b>Spoiler </b><a href="#" onClick="return false;">Show</a></span></div><div class="quotecontent"><div style="display: none;">$1</div></div></div>
It is working fine for this:
[spoiler]text[/spoiler]
But I need to add a title tag in it. So that the below code will also work fine.
Like
[spoiler = sample]text[/spoiler]
Can anybody help please?