Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 Email Spam Mod - admin check
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 20 July 2009 :  13:20:22  Show Profile
I have had the Email Mod successfully installed for over a while and no troubles. Recently I have added another user who has been given administrator tights straight away but so has not posted any threads.
The new admin, tried to email me and was given the rejection (Sorry, You have not contributed enough posts on the forum to email other members) because no posts have been done.
Is there a quick fix to allow admins ie mlev=>3 to post email despite number of threads.
The if intMPosts < 3 then checks for number of posts, can we add an if statement near here to ensure admins can post email irrespective of thread count.


'######## Email Spam Mod ############

if Request.QueryString("mode") = "DoIt" then
	Err_Msg = ""
	strSql = "SELECT M_NAME, M_POSTS FROM " & strMemberTablePrefix & "MEMBERS M"
	strSql = strSql & " WHERE M.MEMBER_ID = " & MemberID

	set rs = my_Conn.Execute (strSql)

	If Not rs.EOF then
		intMPosts = rs("M_POSTS")
			if intMPosts < 3 then
			Err_Msg = "<li>Sorry, You have not contributed enough posts on the forum to email other members.</li>"
			strSpammerName = RS("M_NAME")
			'Send email to forum admin
			strRecipients = strSender
			strFrom = strSender
			strFromName = "Automatic Server Email"
			strSubject = "Possible Spam Poster"
			strMessage = "There is a possible spam poster at " & strForumTitle & vbNewLine & vbNewLine
			strMessage = strMessage & "Member " & strSpammerName & ", with MemberID " & MemberID & ", has been trying to send emails to " & Request.Form("Name") & ", without having enough posts on the forum to be allowed to do it." & vbNewLine & vbNewLine 
			strMessage = strMessage & "Here are the message contents: " & VbNewLine & Request.Form("Msg") & vbNewLine & vbNewLine & vbNewLine & vbNewLine
%>
<!--#INCLUDE FILE="inc_mail.asp" -->
<%
			end If
		end if
		rs.Close
end if

'############# End of email spam mod #############

Just to put the icing on the cake, is there a simple alignment that we can centre these error messages.

Thank you
Andy

modifichicci
Average Member

Italy
787 Posts

Posted - 20 July 2009 :  14:03:55  Show Profile  Visit modifichicci's Homepage
if intMPosts < 3 and mlev < 3 then

or if you want that email to admin is always allowed

if (intMPosts < 3 and mlev < 3) and intMemberID <> intAdminMemberID then

Ernia e Laparocele
Forum di Ernia e Laparocele
Acces - MySql Migration Tutorial
Adamantine forum
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 20 July 2009 :  14:50:48  Show Profile  Visit AnonJr's Homepage
What "Email MOD" are you talking about? If its the one Rui put together then there's been some code floating around that allows Admin's to override the required post count on a person-by-person basis. This was added in to 3.4.07 so even if you're not going to upgrade you've got something to look at for reference.

Having said that, it wouldn't be a bad idea to add a check to make sure that Admins and/or Moderators don't get blocked...
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 20 July 2009 :  17:21:09  Show Profile
Anon it [email spam mod] is the code that Rui has posted before, I searched it out a while ago..
Thank you modifichicci.. for your 'if' statement addition, all works as requested, as simple as that.. Appreciated dot com!
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 20 July 2009 :  17:40:13  Show Profile
Just for the 'icing on the cake' - how do you align the error message to center

Err_Msg = "<li>Sorry, You have not contributed enough posts on the forum to email other members.</li>"


thanking u
andy
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 20 July 2009 :  19:27:03  Show Profile
quote:
Originally posted by Andy Humm

Just for the 'icing on the cake' - how do you align the error message to center

Err_Msg = "<center><li>Sorry, You have not contributed enough posts on the forum to email other members.</li></center>"


thanking u
andy

Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 21 July 2009 :  02:58:07  Show Profile
CF, I did try the provided <center> tag and the message still aligns left, for some strange reason. I also tried to remove the <li> tags but no success. I wonder if there is an alternative.
Go to Top of Page

iane87
Starting Member

USA
42 Posts

Posted - 21 July 2009 :  04:28:35  Show Profile  Visit iane87's Homepage
Try using the newer style tags instead

Err_Msg = "<span style='text-align: center'>Sorry, You have not contributed enough posts on the forum to email other members.</span>"


If that doesn't work post some of the HTML that is outputted around the error message another tag could be affecting it too.

Twitter MOD | Search Provider MOD | W3C Valid RSS MOD | Google Translate MOD

Edited by - iane87 on 21 July 2009 04:33:11
Go to Top of Page

Etymon
Advanced Member

United States
2385 Posts

Posted - 21 July 2009 :  05:03:33  Show Profile  Visit Etymon's Homepage
You are centering just that one Err_Msg but there are others and each one has it's own message. You have to find the final Err_Msg where it actually sits in the table row and then control it from there with either HTML or CSS or a SPAN or a DIV - whatever is your preference. Try that and see where you get.

You are looking for something like this:

<td><font=""whatever goes here like face, color, size"">" & Err_Msg & "</font></td>

or it could be in between something like that and just look like this:

Response.Write Err_Msg

Edited by - Etymon on 21 July 2009 05:06:04
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.36 seconds. Powered By: Snitz Forums 2000 Version 3.4.07