Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 Justified Text
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 26 April 2013 :  13:12:15  Show Profile  Reply with Quote
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"


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"


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>")


"inc_func_posting.asp"



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)


"inc_iconfiles.asp"



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"


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"


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 & _


Edited by - Carefree on 29 April 2013 19:12:45

MaGraham
Senior Member

USA
1297 Posts

Posted - 29 April 2013 :  04:25:32  Show Profile  Reply with Quote
LOVE IT!

I wish you would consider starting an email list and, for those who are interested, send out an email notification when you've done a new mod, Carefree. And, place me at the top of that list.

Seriously, I would have hated to have missed this! I LOVE adding a little something extra for my members! And, for those of us who are perfectionists. . .this is COOL!

THANK YOU!



"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 29 April 2013 :  05:35:46  Show Profile  Reply with Quote
I've written hundreds of mods over the years, some on request, most in answer to suggestions. For a while, I kept a folder full of Snitz mods - but I guess I didn't always put the new ones there. I was looking for one I had done regarding embedding a Google Image link, but cannot seem to find it. Doesn't matter. I wrote another little mod on a similar idea (embedding a CNN news link). Now I'm considering a single link to retrieve both based on a topic's title if in a news forum.
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 29 April 2013 :  08:19:46  Show Profile  Visit HuwR's Homepage  Reply with Quote
@MaGraham

I have enabled subscriptions (FORUM/Topic) for this forum so you can subscribe and not miss MODS when Carefree posts them

MVC .net dev/test site | MVC .net running on Raspberry Pi
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 29 April 2013 :  09:44:02  Show Profile  Reply with Quote
LOL. Just as easy to periodically visit and read the new posts (IMHO).

Edited by - Carefree on 29 April 2013 09:44:20
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 29 April 2013 :  10:26:14  Show Profile  Visit HuwR's Homepage  Reply with Quote
quote:
Originally posted by Carefree

LOL. Just as easy to periodically visit and read the new posts (IMHO).


I don't think everyone is as sad as we are Carefree

MVC .net dev/test site | MVC .net running on Raspberry Pi
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 29 April 2013 :  11:05:34  Show Profile  Send ruirib a Yahoo! Message  Reply with Quote
quote:
Originally posted by HuwR

quote:
Originally posted by Carefree

LOL. Just as easy to periodically visit and read the new posts (IMHO).


I don't think everyone is as sad as we are Carefree


There are a few of us.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 29 April 2013 :  12:27:42  Show Profile  Reply with Quote
Not sure I post mods frequently enough to make it worth the effort. Cannot seem to keep my mind on anything long enough to finish it. It's been several years since I was able to watch an entire movie without losing interest. Fortunately, I can still read a good book. I'll really be a sad case when I lose the rest of my vision.
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 29 April 2013 :  14:20:16  Show Profile  Reply with Quote
quote:
Originally posted by ruirib

There are a few of us.

Yeah, you guys need to get out more.

Support Snitz Forums
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.16 seconds. Powered By: Snitz Forums 2000 Version 3.4.07