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
 Active users & PM mods
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Working
Junior Member

219 Posts

Posted - 06 June 2003 :  02:07:35  Show Profile
When i get a pm and go to PM page, it shows 2 pms in the uppper right.

Any solutions?

It says "Private Messages(1new)" twice.

I don't know anything about code but figure its here somewhere in the inc_header.asp. When installing this i wasn't sure where to put it. It looks like it was already there so i deleted it but it didn't seem to change anything.

This is what it said to do:

This code needs to be after the connection is opened near the top of the page and after
strDBNTUserName is defined. It needs to be placed before sForumNavigation() is called.



' Get Private Message count for display
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 "

' Get Private Message count for display
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

Set rsPM = my_Conn.Execute(strSql)
pmcount = rsPM("pmcount")

rsPM.close
set rsPM = nothing
call sForumNavigation()

Edited by - Working on 06 June 2003 03:01:10

masterao
Senior Member

Sweden
1678 Posts

Posted - 06 June 2003 :  04:43:23  Show Profile  Visit masterao's Homepage
That shouldn't appear twice. Remove the code marked red below.

quote:
Originally posted by Working


' Get Private Message count for display
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 "

' Get Private Message count for display
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


Set rsPM = my_Conn.Execute(strSql)
pmcount = rsPM("pmcount")

rsPM.close
set rsPM = nothing
call sForumNavigation()



The code above isn't the culprit for your twice appearing Private Messages(1new). Look for Sub sForumNavigation() in inc_header.asp, which is where you added the code for the navigation link. Remove the second instance of that code, and it will appear as you want it to.
If you want help with locating it, please post a link to a text-version of your inc_header.asp.

Jan
===========
FR Portal Forums | Active Users 4.0.20 Mod
Go to Top of Page

Working
Junior Member

219 Posts

Posted - 06 June 2003 :  09:56:08  Show Profile
Thx! I got it. It seems when putting the code for the PM, the new version of Snitz already has alot of the code . Where i double and triple check where to place code i do not check to see if it is already there. I better start a new habit. Thanks again.

PS - i looked at the link code but couldn't tell it was for a link. ASP!

When looking at the code now i can see the herf is for the link. What part does the mouse over? The mouse over says: Check your private messages... - i do not see it here.

' DEM --> End of Code added to show subscriptions if they exist
Response.Write " |" & vbNewline & _
" <a href=""members.asp""" & dWStatus("Current members of these forums...") & " tabindex=""-1""><acronym title=""Current members of these forums..."">Members</acronym></a>" & vbNewline & _
" |" & vbNewline

Edited by - Working on 06 June 2003 10:04:46
Go to Top of Page

masterao
Senior Member

Sweden
1678 Posts

Posted - 06 June 2003 :  10:51:39  Show Profile  Visit masterao's Homepage
Im glad you got it working.

The javascript code is created by the dWStatus("Text for the mouse-over") function.

To use it for the Private messages link, use the following code:


  If mLev > 0 then
			If strPMStatus = "1" then
	Response.Write "          <a href=""" & strForumURL & "pm_view.asp""" & dWStatus("Check Your Private Messages...") & " tabindex=""-1""><acronym title=""Check Your Private Messages..."">Private Messages" 
					if pmcount > 0 then Response.Write "(<font color=""" & strActiveLinkColor & """><b>" & pmcount & " New</b></font>)" end if 
	Response.Write "</acronym></a>" & vbNewline & _
			"          |" & vbNewline
			end if
 end if


You might have to modify it a bit (add or remove a |, as I don't know where you will put it in the navigation links. Also, the code above will not show the PM-link unless the visitor is logged in as member.

Jan
===========
FR Portal Forums | Active Users 4.0.20 Mod
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.46 seconds. Powered By: Snitz Forums 2000 Version 3.4.07