Jump to content

Spoiler tag


Guest JoeKuboj

Recommended Posts

  • Replies 123
  • Created
  • Last Reply
Posted

I just found a Spoiler BBCode that works like the vBulletin one, every other codes works inside whit exception of another spoiler tag

this is the code if anyone wants to look at it

<div style="margin: 5px 20px 20px;">
<div class="smallfont" style="margin-bottom:2px"><b>Spoiler</b> - <i>{option}</i>: <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="alt2" style="margin: 0px; padding: 6px; border: 1px inset;">
<div style="display: none;">
{content}
</div>
</div>
</div>

Posted

Not that hard, but keep in mind how some people are.... I can tell people 3 times about something and they still don't listen. lol


Yeah, the majority of my friends are also coders... that helps.

It would be nice to see some kind of "add your own buttons" in 3.0...
Posted

i'm sorry if i'm being really stupid here, but what exactly is the point of this spoiler tag? why would i want to hide text in a black box?

i can't actually think of a single use for it... lol

Posted

for example...

Review for Star Wars Episode IX
It was a crazy movie with lots of surprises, blah blah blah.

Highlight the below text if you want a major movie spoiler:

Everyone died in the end! Holy crapola!



etc. etc. etc.

Posted

you mean there's a whole BBcode tag that's been built into IPB for that? I can imagine for movie forums or video game forums it's be useful, but considering my "user rating" idea was hammered at the start because "not everybody wants such a feature", i can't believe this got through!

Saying that though... i guess the user rating feature got through too, so i shouldn't complain :D

Posted

Here is the SPOILER tag I'm using for one year... It works with smileys, special elements, multiple spoilers per posts... never had a problem with this one :thumbsup:
You can view it on my board.

<div style="padding:4px;border:1px dotted black">
 <script type="text/javascript">
 if(!spoilerid) var spoilerid=1; else spoilerid++; mytagid = spoilerid;
 document.write("<a  onclick='toggleview("+'"'+mytagid+'_closed'+'"'+"); return false;'  style='font-size:10px;text-decoration:none;font-style:normal;font-weight:bold;color:#8394B2'>[Spoiler]  - Click here to show/hide the message.</a><div  id='"+mytagid+"_closed' style='display:none'>");
 </script>
 {content}
 <script type="text/javascript">document.write("</div>"); document.close(); </script>
 </div>

  • 4 weeks later...
Posted

@ Strange_Will

I really like your spoiler code but there seems to be a small bug. I can only use it once per post. If you use it in more than one post than no matter which spoiler you click on it opens only the first spoiler of that post. Strange since i seem to be able to use multiple spoilers per thread, just can't use more than one per post within a topic.

Any suggestions? thX!


-edit-
I just took a look over at your site here and it seems to be working for you. Maybe i messed up an edit. I'll double check my edits but any help would still be greatly appreciated. thX again!

  • 2 weeks later...
Posted

@

Strange_Will

I really like your spoiler code but there seems to be a small bug. I can only use it once per post. If you use it in more than one post than no matter which spoiler you click on it opens only the first spoiler of that post. Strange since i seem to be able to use multiple spoilers per thread, just can't use more than one per post within a topic.



Any suggestions? thX!


-edit-


I just took a look over at your site

here

and it seems to be working for you. Maybe i messed up an edit. I'll double check my edits but any help would still be greatly appreciated. thX again!


http://forums.wolframstudios.com/index.php...&showfile=1
One after another works fine... :P

Link me to your forums if it still doesn't work.
  • 2 months later...
Posted

Here is the SPOILER tag I'm using for one year... It works with smileys, special elements, multiple spoilers per posts... never had a problem with this one :thumbsup:


You can view it

on my board

.


[...]


It seems I can't edit my previous post, so I reply...

The previous spoiler code had a bug with the new ajax profiles. Here's a fix (w00t)

 <div style="padding:4px;border:1px dotted black">
 <script type="text/javascript">
 if(!spoilerid) var spoilerid=1; else spoilerid++;
 if (!document.getElementById("gfooter")) document.write("<a onclick='toggleview("+'"'+spoilerid+'_closed'+'"'+"); return false;' style='font-size:10px;text-decoration:none;font-style:normal;font-weight:bold;color:#8394B2'>[Spoiler] - Click here to show/hide the message.</a><div id='"+spoilerid+"_closed' style='display:none'>");
 </script>
 {content}
 <script type="text/javascript">if (!document.getElementById("gfooter")) document.write("</div>");</script>
 </div>

Posted

If you have 2 accounts, it is likely that your client center email and forum email did not match when converge was applied. Open a ticket with IPS

  • 3 years later...

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...