Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 Button to place [spoiler] tags in Post

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!
Before posting, make sure you have read this topic!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
ChasLaser Posted - 01 August 2008 : 22:58:14
I'd like to add a button that when clicked adds the [ spoiler][ /spoiler] Tags to the message area. I want to use this as a way of Tagging a post with keywords by placing keywords inside the spoiler tags.

I have the icon set up....

Const strIconEditorTags = "icon_editor_tag.gif|23|22"

...but the rest eludes me.




<
6   L A T E S T    R E P L I E S    (Newest First)
leatherlips Posted - 03 August 2008 : 13:14:16
I forgot one more thing...

In inc_post_buttons.asp where you added:

"<a href=""Javascript:spoiler();"" tabindex=""-1"">" & getCurrentIcon(strIconEditorTags,"Insert Spoiler","align=""top""") & "</a>" & vbNewLine


Change it to:

"<a href=""Javascript:tag();"" tabindex=""-1"">" & getCurrentIcon(strIconEditorTags,"Insert Tags","align=""top""") & "</a>" & vbNewLine
<
leatherlips Posted - 03 August 2008 : 12:42:54
You'll also need to add this to inc_func_common.asp: (I had to add the space in the green text below so it would show. Yours won't have the space.)

Look for:

fString = doCode(fString, "[spoiler]", "[/ spoiler]", "<font color=""" & CColor & """>", "</font id=""" & CColor & """>")

Below that add:

fString = doCode(fString, "[tag]", "[/tag]", "<font color=""" & CColor & """>", "</font id=""" & CColor & """>")
<
leatherlips Posted - 03 August 2008 : 10:19:40
Change the code I told you to add from this:

function spoiler() {
   var text = getText();
   if (helpstat) {
      alert("The Spoiler Tag makes the enclosed text HIDDEN.\n\nUSE: [spoiler]This is some hidden text[ /spoiler]");
   } else if (basic) {
      AddTxt="[spoiler]" + text + "[ /spoiler]";
      AddText(AddTxt);
   } else {
      if (text) {
         txt=prompt("Text to be made hidden.",text);
      } else {
         txt=prompt("Text to be made hidden.","Text");
      }
      if (txt!=null) {
         AddTxt="[spoiler]"+txt+"[/ spoiler]";
         AddText(AddTxt);
      }
   }
}


To this:

function tag() {
   var text = getText();
   if (helpstat) {
      alert("The tag function makes the enclosed text HIDDEN.\n\nUSE: [tag]This is some hidden text[/tag]");
   } else if (basic) {
      AddTxt="[tag]" + text + "[/tag]";
      AddText(AddTxt);
   } else {
      if (text) {
         txt=prompt("Text to be made hidden.",text);
      } else {
         txt=prompt("Text to be made hidden.","Text");
      }
      if (txt!=null) {
         AddTxt="[tag]"+txt+"[/tag]";
         AddText(AddTxt);
      }
   }
}
<
ChasLaser Posted - 03 August 2008 : 10:08:56
Thanks Guys for your time! And thanks for incuding the .js bit!!


Besides the obivious changes to these files, are you aware of where I might change 'sploiler' to 'tag' and have the same hidden text effect?<
Carefree Posted - 03 August 2008 : 00:41:55
[quote]Originally posted by leatherlips

In inc_post_buttons.asp look for and add the part in red:

Then in inc_func_common.asp look for:

function strike() {
   var text = getText();
   if (helpstat) {
      alert("Strike-Through Tag Makes the enclosed text have a line through it.\n\nUSE: This is some stricken text");
   } else if (basic) {
      AddTxt="[s]" + text + "[ /s]";
      AddText(AddTxt);
   } else {
      if (text) {
         txt=prompt("Text to be stricken.",text);
      } else {
         txt=prompt("Text to be stricken.","Text");
      }
      if (txt!=null) {
         AddTxt="[s]"+txt+"[ /s]";
         AddText(AddTxt);
      }
   }
}


If you do not find this bit of code in "inc_func_common.asp", look in the javascript folder (js\) for a file titled "inc_code.js". Then just copy/paste where it belongs in that file instead.<
leatherlips Posted - 02 August 2008 : 08:02:17
In inc_post_buttons.asp look for and add the part in red:

"<a href=""Javascript:list();"" tabindex=""-1"">" & getCurrentIcon(strIconEditorList,"Insert List","align=""top""") & "</a>" & vbNewLine & _

Then below that add:

"<a href=""Javascript:spoiler();"" tabindex=""-1"">" & getCurrentIcon(strIconEditorTags,"Insert Spoiler","align=""top""") & "</a>" & vbNewLine

Then in inc_func_common.asp look for:

function strike() {
   var text = getText();
   if (helpstat) {
      alert("Strike-Through Tag Makes the enclosed text have a line through it.\n\nUSE: This is some stricken text");
   } else if (basic) {
      AddTxt="[s]" + text + "[ /s]";
      AddText(AddTxt);
   } else {
      if (text) {
         txt=prompt("Text to be stricken.",text);
      } else {
         txt=prompt("Text to be stricken.","Text");
      }
      if (txt!=null) {
         AddTxt="[s]"+txt+"[ /s]";
         AddText(AddTxt);
      }
   }
}


Below that add (Notice the three green spots. Remove the space in them for your code - I had to but them there for them to show up here.):
function spoiler() {
   var text = getText();
   if (helpstat) {
      alert("The Spoiler Tag makes the enclosed text HIDDEN.\n\nUSE: [spoiler]This is some hidden text[ /spoiler]");
   } else if (basic) {
      AddTxt="[spoiler]" + text + "[ /spoiler]";
      AddText(AddTxt);
   } else {
      if (text) {
         txt=prompt("Text to be made hidden.",text);
      } else {
         txt=prompt("Text to be made hidden.","Text");
      }
      if (txt!=null) {
         AddTxt="[spoiler]"+txt+"[/ spoiler]";
         AddText(AddTxt);
      }
   }
}
<

Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.04 seconds. Powered By: Snitz Forums 2000 Version 3.4.07