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!
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.
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.)
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:
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);
}
}
}