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.