The Forum has been Updated
The code has been upgraded to the latest .NET core version. Please check instructions in the Community Announcements about migrating your account.
This mod adds justified paragraph ability (and button) to the editor. It's available on SnitzBitz. Put this image
into your images folder (save it as "icon_editor_justify.gif"), then make the following changes:
"inc_code.js"
"inc_func_common.asp"
"inc_func_posting.asp"
"inc_iconfiles.asp"
"inc_post_buttons.asp"
"pop_forum_code.asp"
"inc_code.js"
Code:
Look for the following lines (appx 177-196):
function left() {
var text = getText();
if (helpstat) {
alert("Left tag aligns the enclosed text to the left.\n\nUSE: This text is aligned left");
} else if (basic) {
AddTxt="" + text + "";
AddText(AddTxt);
} else {
if (text) {
txt=prompt("Text to be aligned left",text);
} else {
txt=prompt("Text to be aligned left","Text");
}
if (txt!=null) {
AddTxt=""+txt+"";
AddText(AddTxt);
}
}
}
Below those, insert these:
function justify() {
var text = getText();
if (helpstat) {
alert("Justify tag justifies a paragraph (fills the line as much as possible with even right and left borders).\n\nUSE: [justify]This paragraph has justified margins.[/justify]");
} else if (basic) {
AddTxt="[justify]" + text + "[/justify]";
AddText(AddTxt);
} else {
if (text) {
txt=prompt("Text to be justified",text);
} else {
txt=prompt("Text to be justified","Text");
}
if (txt!=null) {
AddTxt="[justify]"+txt+"[/justify]";
AddText(AddTxt);
}
}
}
"inc_func_common.asp"
Code:
Look for the following line (appx 479):
fString = replace(fString, "
", "<br />", 1, -1, 1)
Above it, insert this:
fString = doCode(fString, "[justify]", "[/justify]", "<p align=""justify"">", "</p>")
Code:
Look for the following lines (appx 313-314):
fString = replace(fString, "<div align=""right"">", "", 1, -1, 1)
fString = replace(fString, "</div id=""right"">", "", 1, -1, 1)
Below them, insert these:
fString = replace(fString, "<p align=""justify"">","[justify]", 1, -1, 1)
fString = replace(fString, "</p>","[/justify]", 1, -1, 1)
Code:
Look for the following line (appx 48):
Const strIconEditorHR = "icon_editor_hr.gif|23|22"
Below it, insert this:
Const strIconEditorJustify = "icon_editor_justify.gif|23|22"
"inc_post_buttons.asp"
Code:
Look for the following line (appx 58):
" <a href=""Javascript:hr();"" tabindex=""-1"">" & getCurrentIcon(strIconEditorHR,"Horizontal Rule","align=""top""") & "</a>" & _
Above it, insert this:
" <a href=""Javascript:justify();"" tabindex=""-1"">" & getCurrentIcon(strIconEditorJustify,"Justify","align=""top""") & "</a>" & _
"pop_forum_code.asp"
Code:
Look for the following lines (appx 65-68):
" <p><b>Striking Text:</b><br />" & vbNewLine & _
" Enclose your text with and <br />" & vbNewLine & _
" <i>Example:</i> <b></b>mistake<b></b> = <s>mistake</s>" & vbNewLine & _
" </p>" & vbNewLine & _
Below those, insert these:
" <p><b>Aligning Text Justified:</b><br />" & vbNewLine & _
" Enclose your text with [justify] and [/justify]" & vbNewLine & _
" </p>" & vbNewLine & _