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/O Code)
 "Highlighting" Text in Posts
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

MaGraham
Senior Member

USA
1297 Posts

Posted - 25 March 2015 :  07:21:07  Show Profile  Reply with Quote

Just wondering if anyone has considered doing a mod that would allow members to highlight important text in their posts/replies?


"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

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 26 March 2015 :  23:36:45  Show Profile  Reply with Quote
I will write it in a few minutes. This is untested, but it should do the job. I would highly suggest making this a DIFFERENT color than the search HiLite color above it. You can copy all this or download from SnitzBitz.

This mod adds text highlighting function to the editor.

1. Save the following in your forum folder, then run it from the admin console.

"dbs_highlight.asp"


Highlighter v1.0

[INSERT]
CONFIG_NEW
(C_VARIABLE,C_VALUE)#('STRHIGHLIGHTER','yellow')
[END]


2. Save this in your images folder:

"icon_editor_highlight.png":



3. Make the following changes to forum files:

"admin_config_colors.asp"


Look for the following lines (appx 355-359):

			"              <tr valign=""middle"">" & vbNewLine & _
			"                <td bgColor=""" & strPopUpTableColor & """ align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>HighLight Font Color:</b> </font></td>" & vbNewLine & _
			"                <td bgColor=""" & strPopUpTableColor & """><input type=""text"" name=""strHiLiteFontColor"" size=""10"" maxLength=""20"" value=""" & chkExist(strHiLiteFontColor) & """>" & vbNewLine & _
			"	       <a href=""JavaScript:openWindow3('pop_config_help.asp?mode=colors#colors')"">" & getCurrentIcon(strIconSmileQuestion,"","") & "</a></td>" & vbNewLine & _
			"              </tr>" & vbNewLine & _

Below those, insert these:


			"              <tr valign=""middle"">" & vbNewLine & _
			"                <td bgColor=""" & strPopUpTableColor & """ align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>HighLight Background Color:</b> </font></td>" & vbNewLine & _
			"                <td bgColor=""" & strPopUpTableColor & """><input type=""text"" name=""strHighlighter"" size=""10"" maxLength=""20"" value=""" & chkExist(strHighlighter) & """>" & vbNewLine & _
			"	       <a href=""JavaScript:openWindow3('pop_config_help.asp?mode=colors#colors')"">" & getCurrentIcon(strIconSmileQuestion,"","") & "</a></td>" & vbNewLine & _
			"              </tr>" & vbNewLine & _



"config.asp"


Look for the following line (appx 477):

strShowQuickReply = Application(strCookieURL & "STRSHOWQUICKREPLY")

Below it, insert this:

strHighlighter = Application(strCookieURL & "STRHIGHLIGHTER")


Next, look for the following line (appx 163):

Dim SubCount, MySubCount

Below it, insert this:

Dim strHighlighter




"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 highlight() { var text = getText(); if (helpstat) { alert("Highlight tag changes the background color of text to emphasize it.\n\nUSE: [highlight]This text is highlighted.[/highlight]"); } else if (basic) { AddTxt="[highlight]" + text + "[/highlight]"; AddText(AddTxt); } else { if (text) { txt=prompt("Text to be highlighted",text); } else { txt=prompt("Text to be highlighted","Text"); } if (txt!=null) { AddTxt="[highlight]"+txt+"[/highlight]"; 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, "[highlight]", 
"[/highlight]", "<mark style=""background-color: " & strHighlighter & 
";"">", "</mark>")



"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 those, insert these: fString = replace(fString, "<mark style=""background-color: " & strHighlighter & ";"">","[highlight]", 1, -1, 1) fString = replace(fString, "</mark>","[/highlight]", 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 strIconEditorHighlight = "icon_editor_highlight.png|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:highlight();"" tabindex=""-1"">" & getCurrentIcon(strIconEditorHighlight,"Highlight","align=""top""") & "</a>" & vbNewLine & _



"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>Highlighting Text:</b><br />" & vbNewLine & _
		"                Highlight text with [highlight]<br />" & vbNewLine & _
		"                <i>Example:</i> <b>[hightlight]</b> = <mark>highlighted text</mark>" & vbNewLine & _
		"                </p>" & vbNewLine & _


Edited by - Carefree on 27 March 2015 02:00:57
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.13 seconds. Powered By: Snitz Forums 2000 Version 3.4.07