Author |
Topic |
|
Andy Humm
Average Member
United Kingdom
908 Posts |
Posted - 10 June 2009 : 10:32:07
|
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
|
I think this is the code for the pop up toaster when number of PM=1
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 |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 10 June 2009 : 14:08:02
|
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 %> |
|
|
Andy Humm
Average Member
United Kingdom
908 Posts |
Posted - 11 June 2009 : 11:42:41
|
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 |
|
|
Andy Humm
Average Member
United Kingdom
908 Posts |
Posted - 11 June 2009 : 12:17:28
|
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 |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 11 June 2009 : 18:31:56
|
Yeah, sorry about that _ ;-)
You're welcome. |
|
|
|
Topic |
|