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

 All Forums
 Snitz Forums 2000 DEV-Group
 DEV Bug Reports (Open)
 bug in pop_mail.asp 3.4.07
 New Topic
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 3

Etymon
Advanced Member

United States
2385 Posts

Posted - 09 April 2009 :  07:07:35  Show Profile  Visit Etymon's Homepage
Hey guys, is this part of the upgrade now?
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 09 April 2009 :  10:47:42  Show Profile  Visit AnonJr's Homepage
No fix has made it back into the 3.4.07 code. I've got most of the afternoon clear provided I don't get another interruption like this morning, so I'll try to post a DBS script that you can use to update your existing member base. A permanent solution will probably be added to the next version of the forum.
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 09 April 2009 :  11:21:44  Show Profile
In lieu of a DBS script, you could save this as "allowem.asp" and run it. That way it would remain a one-time use file.

<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="inc_sha256.asp"-->
<!--#INCLUDE FILE="inc_header_short.asp"-->
<%
if mLev > 2 then
	strSql="UPDATE " & strMemberTablePrefix & "MEMBERS SET M_ALLOWEMAIL = 1 WHERE M_ALLOWEMAIL <> 0"
	set rs = Server.CreateObject("ADODB.Recordset")
	rs.Open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText
	set rs=Nothing
else
	Response.Redirect "default.asp"
end if
WriteFooterShort
Response.Redirect "default.asp"
%>
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 09 April 2009 :  12:07:08  Show Profile  Visit AnonJr's Homepage
Go to "(Alternative MOD Setup)" in your Admin Options and past ONE of the two bits below depending on what you want to do.

If you want to automatically allow all exisiting members (all the members you had prior to upgrading, including those with fewer than the specified number of posts) to be able to send e-mail, paste and run the following code:
[UPDATE]
MEMBERS
M_ALLOWEMAIL#1#M_ALLOWEMAIL<>1 AND M_ALLOWEMAIL<>0
[END]



If you want to set all exisiting members to "0" - which will only affect those with fewer than the specified number of posts - paste and run the following code:
[UPDATE]
MEMBERS
M_ALLOWEMAIL#0#M_ALLOWEMAIL<>1 AND M_ALLOWEMAIL<>0
[END]

Edited by - AnonJr on 09 April 2009 13:53:34
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 09 April 2009 :  13:49:13  Show Profile  Visit HuwR's Homepage
don't think that will work, as in this db they were all NULL not empty strings
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 09 April 2009 :  13:53:46  Show Profile  Visit AnonJr's Homepage
Now?
Go to Top of Page

modifichicci
Average Member

Italy
787 Posts

Posted - 12 April 2009 :  04:06:13  Show Profile  Visit modifichicci's Homepage
This could works?

change line
intAllowEmail = cInt(rs("M_ALLOWEMAIL"))

to

checkAllowedmail = rs("M_ALLOWEMAIL")
		
		if checkAllowedmail = "" then
		
	       		strSql="UPDATE " & strMemberTablePrefix & "MEMBERS SET M_ALLOWEMAIL = 0 WHERE MEMBER_ID = " & MemberID"
			set rsmail = Server.CreateObject("ADODB.Recordset")
       			rsmail.Open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText
       			set rsmail=Nothing
			strSql = "SELECT M_ALLOWEMAIL FROM " & strMemberTablePrefix & "MEMBERS "
       			strSql = strSql & " WHERE MEMBER_ID = " & MemberID
	
			set rs1 = my_Conn.Execute (strSql)
			intAllowEmail = cInt(rs1("M_ALLOWEMAIL"))
	 		rs1.close
	 	else
	 	       intAllowEmail = cInt(rs("M_ALLOWEMAIL"))
	 	end if


just for that db that doesn't set the default values..
My mysql has set 1 to all members in the upgrade

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

modifichicci
Average Member

Italy
787 Posts

Posted - 16 April 2009 :  15:32:43  Show Profile  Visit modifichicci's Homepage
any news about this?

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 - 16 April 2009 :  20:46:06  Show Profile  Visit AnonJr's Homepage
Sorry, work has had me a little distracted lately... I was promised it would slow down. But in this economy I'd rather be busy than not.
Go to Top of Page

modifichicci
Average Member

Italy
787 Posts

Posted - 19 April 2009 :  16:11:05  Show Profile  Visit modifichicci's Homepage
tested on an access db and working

change
intAllowEmail = cInt(rs("M_ALLOWEMAIL"))

with

checkAllowedmail = rs("M_ALLOWEMAIL")

if isnull(checkAllowedmail) then

strSql="UPDATE " & strMemberTablePrefix & "MEMBERS SET M_ALLOWEMAIL = 0 WHERE MEMBER_ID = " & MemberID
set rsmail = Server.CreateObject("ADODB.Recordset")
rsmail.Open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText
set rsmail=Nothing
strSql = "SELECT M_ALLOWEMAIL FROM " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " WHERE MEMBER_ID = " & MemberID

set rs1 = my_Conn.Execute (strSql)
intAllowEmail = cInt(rs1("M_ALLOWEMAIL"))
rs1.close
else
intAllowEmail = cInt(rs("M_ALLOWEMAIL"))
end if



so if the value is null it updates field and then retrive the variable, if it is not null it charge the value.

So the routine is used only if necessary.

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

Southern Girl
New Member

78 Posts

Posted - 07 July 2009 :  19:39:13  Show Profile
Where do I paste the above?

Go to Top of Page

modifichicci
Average Member

Italy
787 Posts

Posted - 08 July 2009 :  14:40:36  Show Profile  Visit modifichicci's Homepage
in pop_mail

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

Southern Girl
New Member

78 Posts

Posted - 09 July 2009 :  02:14:12  Show Profile
Smashing that worked!

Go to Top of Page

markvh
Starting Member

USA
4 Posts

Posted - 15 July 2009 :  16:01:43  Show Profile
I ran into this same problem two days ago before I knew that this forum existed and fixed it a differnt way. It was from a clean install of 3.4.07 . I realized that the problem stemmed from the users record for the M_ALLOWEMAIL field being initilaized incorrectly when the record is first created. So I modified register.asp to inilialize the field to zero.
So the code now looks like this (starting at line 104 in register.asp)
'## Forum_SQL
strSql = "INSERT INTO " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & "(M_NAME"
strSql = strSql & ", M_USERNAME"
strSql = strSql & ", M_PASSWORD"
strSql = strSql & ", M_LEVEL"
strSql = strSql & ", M_EMAIL"
strSql = strSql & ", M_DATE"
strSql = strSql & ", M_COUNTRY"
strSql = strSql & ", M_AIM"
strSql = strSql & ", M_ICQ"
strSql = strSql & ", M_MSN"
strSql = strSql & ", M_YAHOO"
strSql = strSql & ", M_POSTS"
strSql = strSql & ", M_HOMEPAGE"
strSql = strSql & ", M_LASTHEREDATE"
strSql = strSql & ", M_STATUS"
strSql = strSql & ", M_RECEIVE_EMAIL"
strSql = strSql & ", M_LAST_IP"
strSql = strSql & ", M_IP"
strSql = strSql & ", M_SIG"
strSql = strSql & ", M_VIEW_SIG"
strSql = strSql & ", M_SIG_DEFAULT"
strSql = strSql & ", M_FIRSTNAME"
strSql = strSql & ", M_LASTNAME"
strSql = strSql & ", M_CITY"
strSql = strSql & ", M_STATE"
strSql = strSql & ", M_PHOTO_URL"
strSql = strSql & ", M_LINK1"
strSql = strSql & ", M_LINK2"
strSql = strsql & ", M_AGE"
strSql = strsql & ", M_DOB"
strSql = strSql & ", M_MARSTATUS"
strSql = strsql & ", M_SEX"
strSql = strSql & ", M_OCCUPATION"
strSql = strSql & ", M_BIO"
strSql = strSql & ", M_HOBBIES"
strsql = strsql & ", M_LNEWS"
strSql = strSql & ", M_QUOTE"
strSql = strSql & ", M_SHA256"
'initialize M_ALLOWEMAIL
strSql = strSql & ", M_ALLOWEMAIL"
strSql = strSql & ") "
strSql = strSql & " VALUES ("
strSql = strSql & "'" & chkString(rsKey("M_NAME"),"SQLString") & "'"
strSql = strSql & ", '" & chkString(rsKey("M_USERNAME"),"SQLString") & "'"
strSql = strSql & ", '" & chkString(rsKey("M_PASSWORD"),"SQLString") & "'"
strSql = strSql & ", " & "1"
strSql = strSql & ", '" & chkString(rsKey("M_EMAIL"),"SQLString") & "'"
strSql = strSql & ", '" & DateToStr(strForumTimeAdjust) & "'"
strSql = strSql & ", '" & chkString(rsKey("M_COUNTRY"),"SQLString") & "'"
strSql = strSql & ", '" & chkString(rsKey("M_AIM"),"SQLString") & "'"
strSql = strSql & ", '" & chkString(rsKey("M_ICQ"),"SQLString") & "'"
strSql = strSql & ", '" & chkString(rsKey("M_MSN"),"SQLString") & "'"
strSql = strSql & ", '" & chkString(rsKey("M_YAHOO"),"SQLString") & "'"
strSql = strSql & ", 0"
strSql = strSql & ", '" & chkString(rsKey("M_HOMEPAGE"),"SQLString") & "'"
strSql = strSql & ", '" & DateToStr(strForumTimeAdjust) & "'"
strSql = strSql & ", 1"
strSql = strSql & ", " & cLng(rsKey("M_RECEIVE_EMAIL")) & " "
strSql = strSql & ", '" & chkString(rsKey("M_LAST_IP"),"SQLString") & "'"
strSql = strSql & ", '" & chkString(rsKey("M_IP"),"SQLString") & "'"
strSql = strSql & ", '" & chkString(rsKey("M_SIG"),"message") & "'"
strSql = strSql & ", '" & chkString(rsKey("M_VIEW_SIG"),"SQLString") & "'"
strSql = strSql & ", '" & chkString(rsKey("M_SIG_DEFAULT"),"SQLString") & "'"
strSql = strSql & ", '" & chkString(rsKey("M_FIRSTNAME"),"SQLString") & "'"
strSql = strSql & ", '" & chkString(rsKey("M_LASTNAME"),"SQLString") & "'"
strSql = strSql & ", '" & chkString(rsKey("M_CITY"),"SQLString") & "'"
strSql = strSql & ", '" & chkString(rsKey("M_STATE"),"SQLString") & "'"
strSql = strSql & ", '" & chkString(rsKey("M_PHOTO_URL"),"SQLString") & "'"
strSql = strSql & ", '" & chkString(rsKey("M_LINK1"),"SQLString") & "'"
strSql = strSql & ", '" & chkString(rsKey("M_LINK2"),"SQLString") & "'"
strSql = strsql & ", '" & chkString(rsKey("M_AGE"),"SQLString") & "'"
strSql = strsql & ", '" & chkString(rsKey("M_DOB"),"SQLString") & "'"
strSql = strSql & ", '" & chkString(rsKey("M_MARSTATUS"),"SQLString") & "'"
strSql = strSql & ", '" & chkString(rsKey("M_SEX"),"SQLString") & "'"
strSql = strSql & ", '" & chkString(rsKey("M_OCCUPATION"),"SQLString") & "'"
strSql = strSql & ", '" & chkString(rsKey("M_BIO"),"message") & "'"
strSql = strSql & ", '" & chkString(rsKey("M_HOBBIES"),"message") & "'"
strSql = strSql & ", '" & chkString(rsKey("M_LNEWS"),"message") & "'"
strSql = strSql & ", '" & chkString(rsKey("M_QUOTE"),"message") & "'"
strSql = strSql & ", 1"
'initialize M_ALLOWEMAIL
strSql = strSql & ", 0"
strSql = strSql & ")"


Go to Top of Page

modifichicci
Average Member

Italy
787 Posts

Posted - 16 July 2009 :  03:29:02  Show Profile  Visit modifichicci's Homepage
I think the problem is not the inizialization I am afraid, as in a new install there is not the problem.
It is in an update that the field isn't filled With a value (0 or 1) in previous members.

Ernia e Laparocele
Forum di Ernia e Laparocele
Acces - MySql Migration Tutorial
Adamantine forum
Go to Top of Page
Page: of 3 Previous Topic Topic Next Topic  
Previous Page | Next Page
 New Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.16 seconds. Powered By: Snitz Forums 2000 Version 3.4.07