Simple Machine Codes
March 29, 2024, 04:46:28 am
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to SMC, the best place for your SMF For Free Codes
 
  Home Help Search Arcade Gallery Affiliates Code Index Staff List Calendar Members Login Register  

Spoiler Tag

Pages: [1] 2   Go Down
  Print  
Author Topic: Spoiler Tag  (Read 4503 times)
0 Members and 1 Guest are viewing this topic.
Agent Moose
Administrator

Offline Offline

Gender: Male
Posts: 2,672



View Profile WWW
« on: November 17, 2007, 06:41:09 pm »

Footers
Code:
<script>
var b = document.getElementsByTagName("div");
//Created by Agent Moose (smcodes.smfforfree3.com)
for(x=0;x<b.length;x++){
if(b[x].className=="post" && b[x].innerHTML.match(/\[spoiler\](.*)\[\/spoiler\]/i)){
b[x].innerHTML = b[x].innerHTML.replace("[spoiler]" + RegExp.$1 + "[/spoiler]","<div><div><a href='javascript:void(0)' onclick='$(this).parent().next().toggle()'>(Click to Show/Hide Spoiler)</a></div><div style='display:none' id='spoiler'>" + RegExp.$1 + "</div></div>");
};};
</script>

Just place [spoiler]YOUR TEXT HERE[/spoiler] to create the spoiler.  Smiley
« Last Edit: March 18, 2008, 06:28:06 pm by Agent Moose » Report Spam   Logged

Share on Facebook Share on Twitter

Myth
Lightning Guardian
Members

Offline Offline

Gender: Male
Posts: 28


Ike for Brawl!


View Profile WWW
« Reply #1 on: November 17, 2007, 09:13:20 pm »

It doesn't work. the tags aren't recognized...
Report Spam   Logged

Agent Moose
Administrator

Offline Offline

Gender: Male
Posts: 2,672



View Profile WWW
« Reply #2 on: November 17, 2007, 09:55:54 pm »

This should work.  I tested it and it does.
Report Spam   Logged

Myth
Lightning Guardian
Members

Offline Offline

Gender: Male
Posts: 28


Ike for Brawl!


View Profile WWW
« Reply #3 on: November 27, 2007, 03:14:29 pm »

Oh nvm I did a "Preview" and it didn't show it, but when you enter it it works Smiley
Report Spam   Logged

Celebrus
Artificially Conscious
Administrator

Offline Offline

Gender: Male
Posts: 1,337


aka Omikron


View Profile WWW
« Reply #4 on: November 29, 2007, 03:37:53 am »

You didn't post this on support, did you?
Report Spam   Logged

Agent Moose
Administrator

Offline Offline

Gender: Male
Posts: 2,672



View Profile WWW
« Reply #5 on: November 29, 2007, 02:29:17 pm »

Nope.  there are accually alot of codes I havn't posted on support.
Report Spam   Logged

Celebrus
Artificially Conscious
Administrator

Offline Offline

Gender: Male
Posts: 1,337


aka Omikron


View Profile WWW
« Reply #6 on: November 30, 2007, 02:03:35 am »

That goes in my sig, lol.
Report Spam   Logged

Coreeeey
Starter

Offline Offline

Posts: 8


View Profile
« Reply #7 on: December 27, 2007, 02:48:02 pm »

Noticed something when I was testing this code.

I have two tags in two different posts with different content in each.


Report Spam   Logged
Agent Moose
Administrator

Offline Offline

Gender: Male
Posts: 2,672



View Profile WWW
« Reply #8 on: December 27, 2007, 03:36:12 pm »

I see.  I had that problem with the Member Quickies.  I will try to fix it.
Report Spam   Logged

Agent Moose Jr.
Ultra Contagious
Global Moderator

Offline Offline

Gender: Male
Posts: 1,045



View Profile WWW
« Reply #9 on: December 29, 2007, 01:35:48 pm »

what does this do??
Report Spam   Logged

Newest:

Celebrus
Artificially Conscious
Administrator

Offline Offline

Gender: Male
Posts: 1,337


aka Omikron


View Profile WWW
« Reply #10 on: January 01, 2008, 05:27:58 am »

It gives your forum spoiler tag capabilities.
Report Spam   Logged

Agent Moose Jr.
Ultra Contagious
Global Moderator

Offline Offline

Gender: Male
Posts: 1,045



View Profile WWW
« Reply #11 on: January 01, 2008, 05:13:33 pm »

um in english please lol ?
Report Spam   Logged

Newest:

Agent Moose
Administrator

Offline Offline

Gender: Male
Posts: 2,672



View Profile WWW
« Reply #12 on: January 03, 2008, 05:06:20 pm »

Code Updated.  Sorry about the long wait for it.

Agent Moose Jr, here is an example:
http://smctest.smfforfree3.com/index.php/topic,31.0.html
Report Spam   Logged

Coreeeey
Starter

Offline Offline

Posts: 8


View Profile
« Reply #13 on: January 03, 2008, 09:01:03 pm »

I'm glad you got it working. I see you released it at the support site.
Report Spam   Logged
zombozo3eyes
Starter

Offline Offline

Posts: 14


View Profile
« Reply #14 on: January 04, 2008, 12:43:39 pm »

I added it and nothing happened, does a button show up on the reply window?
Report Spam   Logged
Pages: [1] 2   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum

Powered by SMF | SMF © 2016, Simple Machines
Privacy Policy