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)
 "Highlighting" Text in Posts

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
MaGraham Posted - 25 March 2015 : 07:21:07

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

1   L A T E S T    R E P L I E S    (Newest First)
Carefree Posted - 26 March 2015 : 23:36:45
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 & _


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