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/Code)
 Private Message Sending Limit MOD

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 [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
endomorph Posted - 20 February 2008 : 02:32:00
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 -

" <td bgColor=""" & strPopUpTableColor & """> </td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """><input name=""Submit"" type=""submit"" value=""Send Message""> <input name=""Preview"" type=""button"" value=""Preview"" onclick=""OpenPreview()""> <input name=""Reset"" type=""reset"" value=""Reset Fields""></td>" & vbNewLine & _
" </tr>" & vbNewLine & _



and replace with this -

" <td bgColor=""" & strPopUpTableColor & """> </td>" & vbNewLine

Session("pmlimit") = Session("pmlimit") + 1

if Session("pmlimit") < 5 then

Response.Write " <td bgColor=""" & strPopUpTableColor & """><input name=""Submit"" type=""submit"" value=""Send Message""> <input name=""Preview"" type=""button"" value=""Preview"" onclick=""OpenPreview()""> <input name=""Reset"" type=""reset"" value=""Reset Fields""></td>" & vbNewLine

else

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.

<
8   L A T E S T    R E P L I E S    (Newest First)
endomorph Posted - 12 March 2008 : 01:25:53
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.<
Andy Humm Posted - 10 March 2008 : 16:25:35
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 Posted - 10 March 2008 : 15:39:34
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 Posted - 10 March 2008 : 15:37:14
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<
campinmom03 Posted - 02 March 2008 : 10:28:31
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.
<
endomorph Posted - 24 February 2008 : 10:59:45
OK, re-worked code -


In privatesend.asp, look for this around line 199 -


" <td bgColor=""" & strPopUpTableColor & """> </td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """><input name=""Submit"" type=""submit"" value=""Send Message""> <input name=""Preview"" type=""button"" value=""Preview"" onclick=""OpenPreview()""> <input name=""Reset"" type=""reset"" value=""Reset Fields""></td>" & vbNewLine & _
" </tr>" & vbNewLine & _



and replace with this -

" <td bgColor=""" & strPopUpTableColor & """> </td>" & vbNewLine

' Change 6 to whatever you want the PM limit to be
if Session("pmlimit") < 6 or mLev = 3 or mLev = 4 then

Response.Write " <td bgColor=""" & strPopUpTableColor & """><input name=""Submit"" type=""submit"" value=""Send Message""> <input name=""Preview"" type=""button"" value=""Preview"" onclick=""OpenPreview()""> <input name=""Reset"" type=""reset"" value=""Reset Fields""></td>" & vbNewLine

else

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
<
philsbbs Posted - 21 February 2008 : 18:01:02
I've installed this and think it's very good but agree with AnonJr points.<
AnonJr Posted - 20 February 2008 : 10:29:48
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<

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