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 MOD-Group
 MOD Add-On Forum (W/O Code)
 PM Mod addon
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 14 March 2006 :  05:29:35  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message  Reply with Quote
I'd like to have this functionality:

When I click the flashing "PM Messages" that tell me I have unread PM:s I would like to automatically open the new message IF there is only one unread message.

I suppose I could "count pm_message_unread" or something, but how? =)
<

/Tribaliztic
- www.gotlandrace.se -

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 14 March 2006 :  07:06:36  Show Profile  Reply with Quote
Should be easy enough to do, in the SQL query that determines whether or not to show the flashing "PM Messages" (I assume this is another mod you have installed?), retrieve the ID of the message(s). Then, when writing the link, check to see if the count is greater than one (in which case, link to the inbox) or not (in which case, link to the message directly using the ID you now have).

<

Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 14 March 2006 :  07:19:58  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message  Reply with Quote
It's this part I'm asking about:
quote:
Originally posted by Shaggy

check to see if the count is greater than one




=)<

/Tribaliztic
- www.gotlandrace.se -
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 14 March 2006 :  07:27:19  Show Profile  Reply with Quote
So's I can properly point you in the right direction, can you post a link to a *.txt copy of the file in question?

<

Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 14 March 2006 :  08:05:48  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message  Reply with Quote
Offcourse=)
http://www.gotlandrace.se/tabort/privatemessblink.txt
<

/Tribaliztic
- www.gotlandrace.se -
Go to Top of Page

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 14 March 2006 :  08:10:08  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message  Reply with Quote
I'm sorry, now that I actually looked at the code, the count is already done =)
<

/Tribaliztic
- www.gotlandrace.se -
Go to Top of Page

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 14 March 2006 :  08:26:42  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message  Reply with Quote
I solved it by making the link like this:
Response.Write "<font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """><b><span class=""spnMessageText""><a href=""privateread.asp?id=" & pmid & """>PM Inkorg</a></span>" & vbNewLine

after inserting this little sql thingy:

if pmcount = 1 then

strSqL2 = "SELECT M_ID as pmid "
strSql2 = strSql2 & " FROM " & strMemberTablePrefix & "MEMBERS , " & strTablePrefix & "PM "
strSql2 = strSql2 & " WHERE " & strMemberTablePrefix & "MEMBERS.M_NAME = '" & strDBNTUserName & "'"
strSql2 = strSql2 & " AND " & strMemberTablePrefix & "MEMBERS.MEMBER_ID = " & strTablePrefix & "PM.M_TO "
strSql2 = strSql2 & " AND " & strTablePrefix & "PM.M_READ = 0 "

Set rsPM2 = my_Conn.Execute(strSql2)
pmid = rsPM2("pmid")

rsPM2.close
set rsPM2 = nothing

end if

Seems like it's working but I haven't tested it with more than one PM yet =)
<

/Tribaliztic
- www.gotlandrace.se -
Go to Top of Page

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 14 March 2006 :  08:29:52  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message  Reply with Quote
w00t!
I forgot to do this with the link:
if pmcount = 1 then
Response.Write "<font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """><b><span class=""spnMessageText""><a href=""privateread.asp?id=" & pmid & """>PM Inkorg</a></span>" & vbNewLine
else
Response.Write "<font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """><b><span class=""spnMessageText""><a href=""pm_view.asp"">PM Inkorg</a></span>" & vbNewLine
end if


But now everything's working as I want!
Removes one step when wanting to read a pm and it's only one unread pm in the inbox. You have to think about the ergonomy you know ;)
<

/Tribaliztic
- www.gotlandrace.se -
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.28 seconds. Powered By: Snitz Forums 2000 Version 3.4.07