Snitz™ Forums 2000
https://forum.snitz.com/forumTopic/Posts/66502?pagenum=1
04 November 2025, 23:52
Topic
endomorph
Private Message Sending Limit MOD
20 February 2008, 02:32
Here is a very quick MOD for those of you who use the Private Message MOD.
This is a quick fix to limit the amount of messages that can be sent in one session. I used it because I found that I had members SPAMMING other members.
In privatesend.asp, look for this around line 199 -
Response.Write " <td bgColor=""" & strPopUpTableColor & """><input name=""Submit"" type=""submit"" disabled=""disabled"" value=""You have sent too many messages in one session""></td>" & vbNewLine
end if
Response.Write " </tr>" & vbNewLine & _
To change you maximum limit, change the number in this line
if Session("pmlimit") < 5 then
Worked great for me, hope this does for you.
<
Replies ...
AnonJr
20 February 2008, 10:29
I don't use the PM MOD, but just a random thought as I read... wouldn't you want to exempt your Admins and Moderators from the limit? I would think that while most members don't need to send more than n PMs a session, your staff may be a different matter. Also, you probably don't want to increment the counter until after the message is sent. I'm not sure where you're initializing the number, but unless you're starting at 0 (a safe assumption) your code will stop me at 4 messages instead of 5.
Either way, I don't want to get dinged for sending a message unless I actually sent it - your code dings me for pulling up the form.
Just a few things I noticed. HTH<
philsbbs
21 February 2008, 18:01
I've installed this and think it's very good but agree with AnonJr points.<
Response.Write " <td bgColor=""" & strPopUpTableColor & """><input name=""Submit"" type=""submit"" disabled=""disabled"" value=""You have sent too many messages in one session""></td>" & vbNewLine
end if
Response.Write " </tr>" & vbNewLine & _
in privatesend_info.asp, look for this around line 385 -
select case Request.Form("Method_Type") case "Topic" Response.Write("Your Message has been sent!") case "Reply" Response.Write("Your Reply has been sent!") case "ReplyQuote" Response.Write("Your Reply has been sent!") case "Forward" Response.Write("Your Message has been Forwarded!") case "Edit" Response.Write("Thank you for your contribution!") case else Response.Write("Have a nice day!") end select and replace with this - select case Request.Form("Method_Type") case "Topic" Response.Write("Your Message has been sent!") Session("pmlimit") = Session("pmlimit") + 1 case "Reply" Response.Write("Your Reply has been sent!") case "ReplyQuote" Response.Write("Your Reply has been sent!") case "Forward" Response.Write("Your Message has been Forwarded!") Session("pmlimit") = Session("pmlimit") + 1 case "Edit" Response.Write("Thank you for your contribution!") case else Response.Write("Have a nice day!") end select <
campinmom03
02 March 2008, 10:28
Has anyone else tried this new mod since the security update with the PM's found here http://forum.snitz.com/forum/topic.asp?TOPIC_ID=66176 ? Just curious.
Any problems or errors with heavily modded forums? I'm asking these questions cause I would love to add this...
But as I read and check my files for the lines and code - mine does look a little different. I would need some help I think.
Just a thought while I'm on the topic of PM's. It sure would be nice to see an option for making drafts and being able to save as a draft. I can't tell you how many times I typed up a PM and wished I had that as an option.
<
Andy Humm
10 March 2008, 15:37
endomorph - which PM Mod did you use, because the suggested text you have for privatesend.asp does not appear on my asp file, even though I have a PM Mod installed.
I used this PM Mod link If this Mod is different, could you suggest the 'if else,then ' alterations for the privatesend.asp file.
The privatesend_info.asp text suggested appears on this PM Mod version. thank you andy<
endomorph
10 March 2008, 15:39
Andy,
Email me the two files and I will code it for you. Not sure exactly which PM I used. It was installed a good few years ago, and sure I took it from Snitzbitz<
Andy Humm
10 March 2008, 16:25
endomorph I could not find an attachment facility on this forum. Two files fowarded via your external email sent to me. Thank you andy<
endomorph
12 March 2008, 01:25
Another happy customer.
BTW, if anyone else would like to see whats used on the site, there is a testing / demo account already set up. Use demo / demo to log in.<