Jump to content

Spoiler


Hellrazor_from_Hell

Recommended Posts

Aus gegebenem Anlass wollte ich mal anfragen, ob ihr vielleicht einen verbesserten Spoiler implementieren könntet. Damit könnte man dann Offtopic Sachen besser ausblenden auch so dass nur Interessierte durch riesige Screenshots belästigt werden.

 

Dazu gibts im Web einiges für das IPB:

 

http://invisionmodding.com/index.php?autoc...&article=10

 

oder auch:

 

http://forums.invisionize.com/BBCODE-Spoil...pt-t106246.html

 

Letzterer ist inzwischen leider nicht mehr frei zugänglich, aber noch im Google Cache:

 

<script language="JavaScript">
function toggle(element) {
if(document.getElementById(element).style.display != "none") {
document.getElementById(element).style.display = "none"; } else {
document.getElementById(element).style.display = "block"; } }
if(spoiler > 0){
var spoiler = spoiler + 1 } else {
var spoiler = 1}
</script>
<div style="background: #B7E5CE;border: 1px dotted #000; border-bottom: 0; border-left: 4px solid #429E6F; color: #000; font-weight: bold; font-size: 10px; margin: 8px auto 0 auto; padding: 3px;">
<script language="JavaScript">document.write("<a href='java script:toggle("+spoiler+")'>Click here to toggle the text.</a>");</script></div>
<div style="background: #FAFCFE; border: 1px dotted #000; border-left: 4px solid #429E6F; border-top: 0; color: #000000; padding: 4px; margin: 0 auto 8px auto;">
<script language="JavaScript">document.write("<div id='" + spoiler + "'>");</script>{content}</div></div>
<script language="JavaScript">toggle(spoiler);</script>

 

MfG

 

Hellrazor

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...