Author |
Topic |
Webbo
Average Member
United Kingdom
982 Posts |
Posted - 13 October 2002 : 16:17:49
|
Hi,
I have an error with the PM's installed on my forum and that is when you click the link to see the Member List in privatesend.asp, the page count for the member list remains at 1 regardless which page you go to when you chose to find a member by using the alphabtic listing at the bottom of the list. If you then use the drop down to go to another page it cannot find that page.
Does this make sense?
Dave |
|
|
padawan
Junior Member
200 Posts |
Posted - 13 October 2002 : 18:49:22
|
sir @TOMIC,
I thought I've seen it here before (but just can't find it now) but someone mentioned something about PM pop-ups (you've got mail) when a user logs in (or when currently logged in) with PM messages.
Can you point me to the right direction, or is this an 'upgrade' in progress?
thanks much!
- padawan
|
"...be mindful of the SnitzForce..." |
|
|
@tomic
Senior Member
USA
1790 Posts |
Posted - 13 October 2002 : 19:06:24
|
quote: I thought I've seen it here before (but just can't find it now) but someone mentioned something about PM pop-ups (you've got mail) when a user logs in (or when currently logged in) with PM messages.
Check either the readme.txt in the Zip(I left that there until I have time to add it to readme.html) or check the older Private Messages topic. It has a couple different ways of doing that.
This will remain an option since everyone doesn't like popup alerts.
@tomic |
SportsBettingAcumen.com |
|
|
@tomic
Senior Member
USA
1790 Posts |
Posted - 13 October 2002 : 19:07:55
|
quote: I have an error with the PM's installed on my forum and that is when you click the link to see the Member List in privatesend.asp, the page count for the member list remains at 1 regardless which page you go to when you chose to find a member by using the alphabtic listing at the bottom of the list. If you then use the drop down to go to another page it cannot find that page.
Does this make sense?
Yes, I understand what you're saying. I will check that out and see to fixing it.
@tomic |
SportsBettingAcumen.com |
|
|
Spizak
Starting Member
5 Posts |
Posted - 14 October 2002 : 12:48:55
|
I added some extra code to my inc_header.asp so that my users can check their PMs on any page.
Around line 520, find: " <a href=""faq.asp""" & dWStatus("Answers to Frequently Asked Questions...") & " tabindex=""-1""><acronym title=""Answers to Frequently Asked Questions..."">FAQ</acronym></a>"
Below this, put: if strDBNTUserName <> "" then if strDBType = "access" then strSqL = "SELECT count(M_TO) as [pmcount] " else strSqL = "SELECT count(M_TO) as pmcount " end if 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 "
Set rsPM = my_Conn.Execute(strSql) pmcount = rsPM("pmcount")
rsPM.close set rsPM = nothing
if strDBNTUserName = "" then Response.Write "<font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """><br>Log in to check your private messages.</font>" & vbNewLine else Response.Write "<font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """><br>" Response.Write "<a href=""pm_view.asp""" & dWStatus("PM Inbox") & " tabindex=""-1""><acronym title=""PM Inbox"">Private Messages</acronym></a>" Response.Write " - <b>" if pmcount >=1 then Response.Write "<font color=""" & strActiveLinkColor & """>" & pmcount & "</font>" else Response.Write pmcount end if Response.Write "</b> new message" if pmcount =1 then Response.Write "." end if if pmcount >1 then Response.Write "s." end if if pmcount =0 then Response.Write "s." end if end if end if |
|
|
@tomic
Senior Member
USA
1790 Posts |
Posted - 14 October 2002 : 12:54:48
|
This is in the readme for inc_header.asp.
@tomic |
SportsBettingAcumen.com |
Edited by - @tomic on 14 October 2002 12:55:11 |
|
|
Webbo
Average Member
United Kingdom
982 Posts |
Posted - 14 October 2002 : 13:30:25
|
There is an easy way to notify a member if they have a new PM. In inc_header.asp at the end of the file add the following and include an image into your forum file named icon_newmes.gif
<table border="0" cellpadding="4" cellspacing="0" width="100%"> <tr> <td width="100%"><font face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>"> <% if strDBNTUserName <> "" then ' Get Private Message count for display on Default.asp if strDBType = "access" then strSqL = "SELECT count(M_TO) as [pmcount] " else strSqL = "SELECT count(M_TO) as pmcount " end if 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 " Set rsPM = my_Conn.Execute(strSql) pmcount = rsPM("pmcount") rsPM.close set rsPM = nothing
if pmCount > 0 then response.write" " & vbNewline & _ " <a href=""pm_view.asp""><img border=""0"" src=""icon_newmes.gif""><acronym title=""Click to read Message"">You have a new Private Message</acronym></a>" & vbNewline end if end if %> </font> </td> </tr> </table>
Effectively this will check the database for a new message when a member changes page. It will show an icon plus linked text to alert of a message. Works well and can be discreet or loud depending on the image that you use
Dave
(Cheers @tomic )
|
|
|
Spizak
Starting Member
5 Posts |
Posted - 14 October 2002 : 14:30:48
|
Ahh, figured the README.TXT was the same as the HTML file.
Oh well. |
|
|
padawan
Junior Member
200 Posts |
Posted - 14 October 2002 : 21:05:02
|
quote: Originally posted by Webbo
There is an easy way to notify a member if they have a new PM. In inc_header.asp at the end of the file add the following and include an image into your forum file named icon_newmes.gif
<table border="0" cellpadding="4" cellspacing="0" width="100%"> <tr> <td width="100%"><font face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>"> <% if strDBNTUserName <> "" then ' Get Private Message count for display on Default.asp if strDBType = "access" then strSqL = "SELECT count(M_TO) as [pmcount] " else strSqL = "SELECT count(M_TO) as pmcount " end if 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 " Set rsPM = my_Conn.Execute(strSql) pmcount = rsPM("pmcount") rsPM.close set rsPM = nothing
if pmCount > 0 then response.write" " & vbNewline & _ " <a href=""pm_view.asp""><img border=""0"" src=""icon_newmes.gif""><acronym title=""Click to read Message"">You have a new Private Message</acronym></a>" & vbNewline end if end if %> </font> </td> </tr> </table>
Effectively this will check the database for a new message when a member changes page. It will show an icon plus linked text to alert of a message. Works well and can be discreet or loud depending on the image that you use
Dave
(Cheers @tomic )
thanks for the tip, mate! I've tried including it in my inc_header.asp but got a "page cannot be viewed" error.
would you mind pointing out the line where i can insert your suggestion? here's the text version of my inc_header.asp
- padawan
|
"...be mindful of the SnitzForce..." |
|
|
@tomic
Senior Member
USA
1790 Posts |
Posted - 14 October 2002 : 21:41:47
|
To be viewed outside the forum the link to pm_view.asp needs strForumURL aded to it.
@tomic |
SportsBettingAcumen.com |
|
|
Webbo
Average Member
United Kingdom
982 Posts |
Posted - 15 October 2002 : 15:42:07
|
Hi padawan,
Paste it in straight after:
else allGroupCatData = rsgroups.GetRows(adGetRowsRest) recGroupCatCount = UBound(allGroupCatData, 2) end if rsgroups.Close set rsgroups = nothing end if %>
When you say that page cannot be found do you mean when you click the PM notification link? If so make sure that this bit: " <a href=""pm_view.asp"">< is th ecorrect path to your pm_view.asp file. The above link assumes that youhave the file in the root of your forum directory
Email me if it still doesn't work, Cheers, Dave
|
|
|
@tomic
Senior Member
USA
1790 Posts |
Posted - 15 October 2002 : 16:09:24
|
<a href=""" & strForumURL & "pm_view.asp""> would make the link work from outside the forum.
@tomic |
SportsBettingAcumen.com |
|
|
padawan
Junior Member
200 Posts |
Posted - 15 October 2002 : 21:23:40
|
quote: Originally posted by Webbo
Hi padawan,
Paste it in straight after:
else allGroupCatData = rsgroups.GetRows(adGetRowsRest) recGroupCatCount = UBound(allGroupCatData, 2) end if rsgroups.Close set rsgroups = nothing end if %>
When you say that page cannot be found do you mean when you click the PM notification link? If so make sure that this bit: " <a href=""pm_view.asp"">< is th ecorrect path to your pm_view.asp file. The above link assumes that youhave the file in the root of your forum directory
Email me if it still doesn't work, Cheers, Dave
VERY NICE!!! Wow! For something so small, I think it can have quite a tremendous boost to a forum. Members would be so addicted to PM's once they see that "You Have Mail" (icon_newmes.gif) blinking.
The reason why it wasn't working for me earlier was because I included the statement on top of %>. I thought this symbol is a delimiter. Once I've placed your codes below it, everything worked fine.
BTW, I've modified your code so that it looks for icon_newmes.gif in my \images folder. The original points to the \forum folder.
- a greatful Padawan
|
"...be mindful of the SnitzForce..." |
Edited by - padawan on 15 October 2002 21:25:14 |
|
|
Webbo
Average Member
United Kingdom
982 Posts |
Posted - 16 October 2002 : 16:22:10
|
Cheers padawan,
If you need an icon you can have use of this one:
It loops for 20 seconds before becoming stationary and certainly grabs your attention
Dave |
|
|
@tomic
Senior Member
USA
1790 Posts |
Posted - 16 October 2002 : 16:50:20
|
You may use the ones I made as well:
If anyone would like to contribute PM images. I will include them in the ZIP so people can pick which style best suits their needs.
@tomic |
SportsBettingAcumen.com |
|
|
Topic |
|