Too long; didn't read

What do you want to see here? Some more categories, forums, and mods? Hmm...
Durf
Match Winner
Posts: 426
Joined: Mon Jul 30, 2012 10:35 pm

Re: Too long; didn't read

Post by Durf » Mon Mar 02, 2015 11:12 pm

/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>
^ this won't work in Firefox; nor will it allow you to hide images or use any formatting within the spoiler content.
<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).

User avatar
/dev/null
Shutout Match Winner
Posts: 820
Joined: Sat Sep 04, 2004 6:28 pm
Location: Chicago-ish

Re: Too long; didn't read

Post by /dev/null » Sun Mar 15, 2015 2:20 pm

Nothing I posted will work as bbcode, however, it is how you implement it if you are too behind the times to figure out how to use the things that are already there.

Post Reply