Not Solved [How To?] Spoiler
#1
Not Solved
How Would I make it so when users use [spoiler][/spoiler] they can make a custom title like [spoiler='CustomTitle']SpoilerHere[/spoiler]?
Heres my current mycode

title:
Spoiler

Short Description:
Spoiler

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: balock;"><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>

I got this stuff fromĀ https://community.mybb.com/post-864335.html It works but I want to be able to name my spoilers. How?
Reply


Messages In This Thread
Spoiler - by PiggyPiglet - 2016-12-11, 04:15 AM
RE: Spoiler - by PiggyPiglet - 2016-12-14, 08:54 AM
RE: Spoiler - by metulburr - 2016-12-14, 06:29 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)