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
 Pop-up toaster for PM Mod query
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 10 June 2009 :  10:32:07  Show Profile
Having the Pop toaster addition included with the PM Mod, both installed and working of sorts. I have just noticed on my PM Inbox that if I have a few PM's, that the pop up toaster will not identify the latest single unread message.

The top inbox entries:
1. Read - client A 6 June 2009 pm
2. Read - client B 6 June 2009 am
3. New Meassage - Client C 27 May 2009

When the pop up toaster shows it reveals new PM (1) for Client A even though this PM has been read. Is there a way to ensure that the toaster displays the name of the latest unread PM (3) rather than the latest Inbox PM (1).
Obviously this ambiquity is not apparent when there are more than one unread PM's, because the toaster shows x PM's to be read.
Any help would be greatly appreciated if this is a common fault.

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 10 June 2009 :  10:48:44  Show Profile
I think this is the code for the pop up toaster when number of PM=1
elseif pmcount = 1 then
	strSql = "SELECT " & strMemberTablePrefix & "MEMBERS.MEMBER_ID, " & strMemberTablePrefix & "MEMBERS.M_NAME, " & strTablePrefix & "PM.M_ID, " & strTablePrefix & "PM.M_TO, " & strTablePrefix & "PM.M_SUBJECT, " & strTablePrefix & "PM.M_SENT, " & strTablePrefix & "PM.M_FROM, " & strTablePrefix & "PM.M_READ "
	strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS , " & strTablePrefix & "PM "
	strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS.M_NAME = '" & strDBNTUserName & "'"
	strSql = strSql & " AND " & strMemberTablePrefix & "MEMBERS.MEMBER_ID = " & strTablePrefix & "PM.M_TO "
	strSql = strSql & " ORDER BY " & strTablePrefix & "PM.M_SENT DESC" 

	Set rsMessage = my_Conn.Execute(strSql)
	if not (rsmessage.eof and rsmessage.bof) then
		PMID = rsMessage("M_ID")
		PMFrom = rsmessage("M_FROM")
		rsmessage.close
		Set rsmessage=nothing
		strSql = "SELECT M_NAME FROM " & strmembertableprefix & "MEMBERS WHERE MEMBER_ID = " & pmfrom
		Set rsMessage = my_Conn.Execute(strSql)
		pmName = rsmessage("M_NAME")
		rsmessage.close
		Set rsmessage=nothing
		if request.Cookies("pmnotify" & pmid) = "" then%>

Not a billiwhizz on sql but I wonder if the query could look for the latest 'unread' PM rather than the latest listed PM in the inbox.

Edit: Scrollcode box added

Edited by - Andy Humm on 10 June 2009 10:54:31
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 10 June 2009 :  14:08:02  Show Profile
Sure, Andy, that's no problem. You only have to change one line.

[scrollcode][code]
elseif pmcount = 1 then
strSql = "SELECT " & strMemberTablePrefix & "MEMBERS.MEMBER_ID, " & strMemberTablePrefix & "MEMBERS.M_NAME, " & strTablePrefix & "PM.M_ID, " & strTablePrefix & "PM.M_TO, " & strTablePrefix & "PM.M_SUBJECT, " & strTablePrefix & "PM.M_SENT, " & strTablePrefix & "PM.M_FROM, " & strTablePrefix & "PM.M_READ "
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS , " & strTablePrefix & "PM "
strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS.M_NAME = '" & strDBNTUserName & "'"
strSql = strSql & " AND " & strMemberTablePrefix & "MEMBERS.MEMBER_ID = " & strTablePrefix & "PM.M_TO "
strSql = strSql & " AND " & strTablePrefix & "PM.M.READ=0"
strSql = strSql & " ORDER BY " & strTablePrefix & "PM.M_SENT DESC"

Set rsMessage = my_Conn.Execute(strSql)
if not (rsmessage.eof and rsmessage.bof) then
PMID = rsMessage("M_ID")
PMFrom = rsmessage("M_FROM")
rsmessage.close
Set rsmessage=nothing
strSql = "SELECT M_NAME FROM " & strmembertableprefix & "MEMBERS WHERE MEMBER_ID = " & pmfrom
Set rsMessage = my_Conn.Execute(strSql)
pmName = rsmessage("M_NAME")
rsmessage.close
Set rsmessage=nothing
if request.Cookies("pmnotify" & pmid) = "" then
%>
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 11 June 2009 :  11:42:41  Show Profile
Hi CF, I have tried your suggested line in red and receive the following error:
error '80004005'
/forum/inc_footer.asp, line 136

line 136 being in red
strSql = strSql & " AND " & strMemberTablePrefix & "MEMBERS.MEMBER_ID = " & strTablePrefix & "PM.M_TO "
strSql = strSql & " AND " & strTablePrefix & "PM.M.READ=0"
strSql = strSql & " ORDER BY " & strTablePrefix & "PM.M_SENT DESC"

Set rsMessage = my_Conn.Execute(strSql)
if not (rsmessage.eof and rsmessage.bof) then
thank you so far
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 11 June 2009 :  12:17:28  Show Profile
CF I have spotted the error -
the line suggested in red
strSql = strSql & " AND " & strTablePrefix & "PM.M.READ=0"
should be
strSql = strSql & " AND " & strTablePrefix & "PM.M_READ= 0 "

Thanks for getting us on track ,,
Andy
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 11 June 2009 :  18:31:56  Show Profile
Yeah, sorry about that _ ;-)

You're welcome.
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.27 seconds. Powered By: Snitz Forums 2000 Version 3.4.07