^ this won't work in Firefox; nor will it allow you to hide images or use any formatting within the spoiler content./dev/null wrote:Code: Select all
[spoiler]{TEXT}[/spoiler]
Code: Select all
<div style="margin:20px; margin-top:5px"><div class="quotetitle"><b>Spoiler:</b> <input type="button" value="Show" style="width:45px;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'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }" /></div><div class="quotecontent"><div style="display: none;">{TEXT}</div></div></div>
<edit: my mistake - the part that was incompatible doesn't really do anything so it wouldn't even matter if it didn't work in firefox. The code you posted is fine, but I'm still not sure how it works in firefox.>
There's a reason why I rewrote the bbcode (not only to be shorter but more compatible).
If the name of the tag matters so much, just replace "tldr" with "spoiler".
Note: using classes like quotetitle may vary from style to style, so my solution avoids all css from phpBB (we can add it in later)
Here's an example of yet another version (in-line without a button!).
Keep in mind that anything can be changed; we can decide on what's best for these forums.
Again, if "spoiler" is preferred over "tldr" then by all means, just change it when adding it in (actually you could safely add in both and users would have the choice, then, on which to use).