Gossamer Forum
Home : Products : Gossamer Forum : Development, Plugins and Globals :

Re: [Westin] Spoiler code would be really useful.

Quote Reply
Re: [Westin] Spoiler code would be really useful. In reply to
Okay, so heres what I've been using and tried and works limited in both browsers:

Code:

<script type="text/javascript">

function toggleIframe(target) {
targetLayer = document.getElementById(target).style;
targetLayer.display = (targetLayer.display == "none") ? "" : "none";

}
</script>
<div class="nicetext">SPOILER:
[<a href="javascript:toggleIframe('iframetextdeck');">show</a>] | [<a href="javascript:toggleIframe('iframetextdeck');">hide</a>]</div>

<div id="iframetextdeck" style="display: none;">
<div>


closing tag code:
Code:

</div></div>


When I say it works limited, it's not a problem with the code, but rather what the advanced Gforum editor does to the content when editing your own post again:

A problem with this is that when a person uses the advanced editor (or the basic for that matter) to edit their post, the system has already translated the [spoiler][/spoiler] tags to what is going to be written on the page. However this then means it's going to translate it even further and just mess up the actual code. So it only works on the initial posting of a message, beyond that if the person edits their post again, they would need to cut out all the extra crap that Glinks puts into the message and re-enter the spoiler tags again to get it functioning again. Far less than an elegant solution and probably one that most people wont want on their own forums for not wanting to hassle the users with this.

Last edited by:

Westin: May 20, 2009, 3:48 AM
Subject Author Views Date
Thread Spoiler code would be really useful. Westin 8910 May 19, 2009, 12:43 PM
Thread Re: [Westin] Spoiler code would be really useful.
brewt 8637 May 19, 2009, 1:21 PM
Thread Re: [brewt] Spoiler code would be really useful.
Westin 8642 May 19, 2009, 1:34 PM
Thread Re: [Westin] Spoiler code would be really useful.
Westin 8639 May 19, 2009, 10:17 PM
Post Re: [Westin] Spoiler code would be really useful.
Westin 8605 May 20, 2009, 3:48 AM