2016-12-11, 04:15 AM
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
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?
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?