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)
 Mod addon: Msg Icons in PMs (v3.4)
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

masterao
Senior Member

Sweden
1678 Posts

Posted - 07 September 2002 :  18:45:02  Show Profile  Visit masterao's Homepage
I've made an addon to the Private Message mod 3.4.02 and the Message Icons mod 1, on Snitz Forums 200 v3.4. If your forum don't have the above setup, do not use this addon.

You can find the PM mod in this topic, and you can find the Message Icon at SnitzBitz.com.

To add the Msg Icons to PMs, you need to edit several files. Please backup all files before you edit them. If something doesn't work, you can restore the working ones.

Edit: The instructions for adding the code to pm_view.asp have been updated. The change is marked red. You must also update your database for this addon to work. The instructions for that is as follows:

Go to your admin section. Click on Alternative Mod Setup, and then paste the following into the form-field:

[ALTER]
PM
ADD#M_MSGICON#int#NULL#1
[END]

Then update the database and you're done.


If you need help with this addon, please post in the Help: MOD Implementation forum.

Now, lets get to the addon.

First file to edit is privatesend.asp

Find this on line 159:


if strRqMethod = "Topic" then
	Response.Write	"        <tr>" & vbNewLine & _
			"          <td bgColor=""" & strPopUpTableColor & """ noWrap vAlign=""top"" align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Subject:</b></font></td>" & vbNewLine & _
			"          <td bgColor=""" & strPopUpTableColor & """><input maxLength=""50"" name=""Subject"" value=""" & Trim(ChkString(TxtSub,"display")) & """ size=""50""></td>" & vbNewLine & _
			"        </tr>" & vbNewLine

end if


Add the following after that:


%>
<!--#INCLUDE FILE="inc_messageicons.asp" -->
<%


That's it for privatesend.asp. Next is privatesend_info.asp

Find this on line 164 and approx 326:


				strSql = strSql & ", M_OUTBOX"


Add this after that:


				strSql = strSql & ", M_MSGICON"


Find this on line 175 and approx 337:


					strSql = strSql & ", '" & 1 & "')"
				else
					strSql = strSql & ", '" & 0 & "')"
				end if


Replace it with this:


					strSql = strSql & ", '" & 1 & "'"
				else
					strSql = strSql & ", '" & 0 & "'"
				end if
				strSql = strSql & ", " & cLng(Request.Form("strMessageIcon")) & ")"



Then we're done with privatesend_info.asp. Next is pm_view.asp

Find this on line 133 and approx 251:


				"    <td width=""20""><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strHeadFontColor & """> </font></td>" & vbNewLine & _


Add this after that:


				"    <td width=""20""><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strHeadFontColor & """> </font></td>" & vbNewLine & _


Search for this on line 156 and approx 268:


		strSql = strSql & ", " & strTablePrefix & "PM.M_OUTBOX "


Add this below that:


		strSql = strSql & ", " & strTablePrefix & "PM.M_MSGICON "


Next find this on line 182:


				strFromMemberName = getMemberName(rsMessage("M_FROM"))
				strIsNew = rsMessage("M_READ")


Add this below that:


    strMsgIcon = rsMessage("M_MSGICON")



Find this on line 168 and approx 281:


					"    <td bgcolor=""" & strForumFirstCellColor & """> </td>" & vbNewLine & _


Add this below that:


					"    <td bgcolor=""" & strForumFirstCellColor & """> </td>" & vbNewLine & _


- Edited
Then search for this on line 196:


				if strIsNew = "0" then
					Response.Write  (getCurrentIcon(strIconPmnewSm,"New Message","hspace=""0"""))
				else
					Response.Write	"<span class=""spnMessageText""><a href=""pm_view.asp?marknew=1&id=" & rsMessage("M_ID") & """>" & (getCurrentIcon(strIconPmOld,"Click here to mark this message new","hspace=""0""")) & "</a></span>"
				end if
				Response.Write	"</td>" & vbNewLine & _



Add the following below that, so that it looks like this:


						"    <td align=""center"" bgcolor=""" & CColor & """>" & _
(getCurrentIcon(getCurrentMsgIcon(strMsgIcon),"","hspace=""0"""))  &	"</td>" & vbNewLine & _
						"    <td bgcolor=""" & CColor & """><font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><span class=""spnMessageText""><a href=""privateread.asp?id=" & rsMessage("M_ID") & """>" & strNewPMs & rsMessage("M_SUBJECT") & strNewPMe & "</a></span></font></td>" & vbNewLine & _



Find this on line 295:


				strTOMemberName = getMemberName(rsFMessage("M_TO"))
				strIsRead = rsFMessage("M_READ")


Add this below that:


    strSentMsgIcon = rsFMessage("M_MSGICON")



Find this on line 309:


				if strIsRead = "0" then
					Response.Write	getCurrentIcon(strIconPmnewsm,"" & strTOMemberName & " has not read this message yet.","align=""absmiddle""")
				else
					Response.Write	getCurrentIcon(strIconPmOld,"" & strTOMemberName & " has read this message yet.","align=""absmiddle""")
				end if
				Response.Write	"</td>" & vbNewLine & _


Add this below that:


						"    <td align=""center"" bgcolor=""" & CColor & """>" & _
(getCurrentIcon(getCurrentMsgIcon(strSentMsgIcon),"New Message","hspace=""0"""))  &	"</td>" & vbNewLine & _


Now we are finished with pm_view.asp. Next file to edit is privateread.asp.

Find this on line 74:


	strSql = strSql & ", " & strTablePrefix & "PM.M_MESSAGE "


Add this below that:

	strSql = strSql & ", " & strTablePrefix & "PM.M_MSGICON "


Find on line 108:


	strPMMessage = rs("M_MESSAGE")


Add this after that:


	strPMMsgIcon = rs("M_MSGICON")


Find this on line 157:


			"    <td bgcolor=""" & strForumFirstCellColor & """ valign=""top"">" & vbNewLine & _
			"    " & getCurrentIcon(strIconPosticon,"","") & "<font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>Sent - " & ChkDate(strPMSent, " : " ,true) & "  " & "</font>" & vbNewLine


Replace it with this:


			"    <td bgcolor=""" & strForumFirstCellColor & """ valign=""top"">" & vbNewLine & _
			"    " & getCurrentIcon(getCurrentMsgIcon(strPMMsgIcon),"","hspace=""3""") & "<font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize  & """>Sent - " & ChkDate(strPMSent, " : " ,true) & "  " & "</font>" & vbNewLine


Now we only have one file left to modify, which is inc_messageicons.asp

Find this on line 2:


if strRqMethod = "Reply" or _
strRqMethod = "ReplyQuote" or _
strRqMethod = "Topic" or _
strRqMethod = "TopicQuote" then 


Replace that with the following:


if strRqMethod = "Reply" or _
strRqMethod = "ReplyQuote" or _
strRqMethod = "Topic" or _
strRqMethod = "Forward" or _
strRqMethod = "TopicQuote" then 


Finished, enjoy the Message Icons in your PMs.


Jan
===========
FR Portal Forums | Active Users 4.0.20 Mod

Edited by - masterao on 25 September 2002 22:13:16

Tmpj
Junior Member

Denmark
467 Posts

Posted - 08 September 2002 :  03:51:37  Show Profile
Good Work!
Go to Top of Page

masterao
Senior Member

Sweden
1678 Posts

Posted - 08 September 2002 :  06:11:36  Show Profile  Visit masterao's Homepage
Thanks Tmpj.


Jan
===========
FR Portal Forums | Active Users 4.0.20 Mod
Go to Top of Page

DoraMoon
Average Member

Taiwan
661 Posts

Posted - 25 September 2002 :  12:07:11  Show Profile
thank you masterao for great addon !

a small problem... does it need a new dbs file to add PM.M_MSGICON ??
if yes, please show me how to do this. i'm afraid of making a mistake if i do this by myself.
and the modification in line.196, also a little strange...

thanks again..
Go to Top of Page

masterao
Senior Member

Sweden
1678 Posts

Posted - 25 September 2002 :  21:40:41  Show Profile  Visit masterao's Homepage
Good catch, Dora. I must have missed that one.

To remedy this, go to your admin section. Click on Alternative Mod Setup, and then paste the following into the form-field:

[ALTER]
PM
ADD#M_MSGICON#int#NULL#1
[END]

Thanks again for catching this.

What is it that you are wondering about line 196?


Jan
===========
FR Portal Forums | Active Users 4.0.20 Mod

Edited by - masterao on 25 September 2002 21:45:17
Go to Top of Page

DoraMoon
Average Member

Taiwan
661 Posts

Posted - 25 September 2002 :  21:55:20  Show Profile
hi~ masterao,
thanks for confirm this for me...

about the line.196
i mean the modification in pm_view.asp.
in line.196, i think you put the wrong document on the top post..
the code "search for..." seem the same with "after modify..."

i can guess that it should something modify like the line.309
just remind you this... thanks again for great mod addon!
Go to Top of Page

masterao
Senior Member

Sweden
1678 Posts

Posted - 25 September 2002 :  22:09:38  Show Profile  Visit masterao's Homepage
You're right, I had missed to paste the new code to be added, and instead pasted the text that you should be looking for again. I have changed the instructions above, and added the right code that should be inserted.

Thanks for pointing this out, DoraMoon.


Jan
===========
FR Portal Forums | Active Users 4.0.20 Mod
Go to Top of Page

MaD2ko0l
Senior Member

United Kingdom
1053 Posts

Posted - 30 September 2002 :  16:16:23  Show Profile  Visit MaD2ko0l's Homepage
help: i get this error

Microsoft VBScript runtime error '800a000d'

Type mismatch: 'getCurrentMsgIcon'

/mad/inc_messageicons.asp, line 11


can soem one plz help me??

thankx

MaD2ko0l


nevermind my fault

© 1999-2010 MaD2ko0l

Edited by - MaD2ko0l on 30 September 2002 16:22:33
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.25 seconds. Powered By: Snitz Forums 2000 Version 3.4.07