I needed the ability to alternately PM just moderators so I came up with a few simple mods to add this feature. This will simply add another check box in the privatesend.asp if an admin is creating the PM and then specify an additional WHERE clause to filter for M_LEVEL=2.
PRIVATE.ASP
on about line 149: mLev = 4) and strRqMethod <> "Forward" then Response.Write ("<br><input type=""checkbox"" name=""allmem"" value=""true"">Send PM to all users<br>") '# All Member PM Modification
change to: if (mLev = 4) and strRqMethod <> "Forward" then Response.Write ("<br><input type=""checkbox"" name=""allmem"" value=""true"">Send PM to all users<br><input type=""checkbox"" name=""allmod"" value=""true"">Send PM to all moderators") '# All Member PM Modification + All Moderators PM Notification
IN PRIVATESEND_INFO.ASP:
on about line 79: if Request.form("allmem") = false then '# PM All Members MOD change to: if Request.form("allmem") = false and Request.form("allmod") = false then '# PM All Members MOD + PM All Moderators MOD
starting on about line 104: '############### Start PM all members ################# if Request.form("allmem") = "true" then
strSql = "SELECT M_NAME" strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS " strSql = strSql & " WHERE M_PMRECEIVE = 1" strSql = strSql & " ORDER BY M_NAME Asc"
Insert the following after above code '############### Start PM all MODERATORS ############## elseif Request.form("allmod") = "true" then strSql = "SELECT M_NAME" strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS " strSql = strSql & " WHERE M_LEVEL = 2" strSql = strSql & " AND M_PMRECEIVE = 1" strSql = strSql & " ORDER BY M_NAME Asc" '############### End PM all MODERATORS ################
on line 181: if request.form("allmem") = false then '# PM all members Mod - Take out e-mail notification
change to: if request.form("allmem") = false and Request.form("allmod") = false then '# PM all members Mod + PM all moderators mod - Take out e-mail notification
i ahve added your code into my script and when i use pm all mods it works purfectly but when it comes to pm all users it come up with this message Microsoft VBScript runtime error '800a000d'
Type mismatch: 'UBound'
/leemarcham/forum/privatesend_info.asp, line 139
here is my line 139
for i = 0 to ubound(arrNames) and im using foum 3.04.03