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
 Online Status - Buddy MOD
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

stwilson
Junior Member

USA
385 Posts

Posted - 23 March 2002 :  12:17:27  Show Profile  Visit stwilson's Homepage
Has anyone been able to get the buddy mod "online status" to show accurately a users online status? Mine always says Offline, even when it shows in the Active User mod that the user is online.

Any thoughts? I want to fix it.

STW.

crash
Advanced Member

Netherlands
2064 Posts

Posted - 23 March 2002 :  17:48:43  Show Profile  Visit crash's Homepage
what code does the mod use? i'm not familiar with the mod. maybe you should contact the creator of it...



Crash's Site | Crash is from
Go to Top of Page

bcales
Starting Member

10 Posts

Posted - 03 April 2002 :  12:58:39  Show Profile
'### Returns Buddies Who Are Online
strSqlOnline = "SELECT " & strMemberTablePrefix & "MEMBERS.M_NAME," & strMemberTablePrefix & "ONLINE.M_BROWSE"
strSqlOnline = strSqlOnline & " FROM (" & strMemberTablePrefix & "ONLINE INNER JOIN " & strMemberTablePrefix & "MEMBERS ON " & strMemberTablePrefix & "ONLINE.UserID =" & strMemberTablePrefix & "MEMBERS.M_NAME) INNER JOIN " & strMemberTablePrefix & "BUDDYS ON " & strMemberTablePrefix & "MEMBERS.MEMBER_ID = " & strMemberTablePrefix & "BUDDYS.BUDMEMBERID"
rsOnline.open strSqlonline, my_Conn
'###

Go to Top of Page

crash
Advanced Member

Netherlands
2064 Posts

Posted - 03 April 2002 :  13:14:38  Show Profile  Visit crash's Homepage
try this:

'### Returns Buddies Who Are Online
strSqlOnline = "SELECT " & strTablePrefix & "MEMBERS.M_NAME," & strTablePrefix & "ONLINE.M_BROWSE"
strSqlOnline = strSqlOnline & " FROM (" & strTablePrefix & "ONLINE INNER JOIN " & strTablePrefix & "MEMBERS ON " & strTablePrefix & "ONLINE.UserID =" & strTablePrefix & "MEMBERS.M_NAME) WHERE " & strTablePrefix & "ONLINE.CHECKEDIN <> '' INNER JOIN " & strTablePrefix & "BUDDYS ON " & strTablePrefix & "MEMBERS.MEMBER_ID = " & strTablePrefix & "BUDDYS.BUDMEMBERID"
rsOnline.open strSqlonline, my_Conn
'###

NOTE: the quotes after <> are two single ones, NOT one double



Crash's Site | Crash is from


Edited by - crash on 03 April 2002 13:16:16
Go to Top of Page

Nathan
Help Moderator

USA
7664 Posts

Posted - 03 April 2002 :  13:48:35  Show Profile  Visit Nathan's Homepage
Thats one ugly pice of SQL. . . and you cant put joins in the WHERE clause crash.

'### Returns Buddies Who Are Online
strSqlOnline = "SELECT ME.M_NAME, WO.M_BROWSE " & _
"FROM " & strTablePrefix & "ONLINE WO, " & strMemberTablePrefix & "MEMBERS ME, " & strTablePrefix & "BUDDYS B, " & _
"WHERE WO.ONLINE.CHECKEDIN <> '' AND ME.MEMBER_ID = B.BUDMEMBERID" AND WO.USERID = ME.M_NAME
set rsOnline = my_Conn.execute(strSqlonline)
'###



  Nathan Bales - Romans 15:13
----------------------------------

Snitz Exchange | Do's and Dont's
Go to Top of Page

bcales
Starting Member

10 Posts

Posted - 03 April 2002 :  14:25:54  Show Profile
both ways don't work let me give you more of the script
===================================
<%

If trim(strDBNTUserName)="" Then%>
<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">Invalid UserName or Password</font></p>
<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><a href="JavaScript:history.go(-1)">Go Back To Retry</a></font></p>
<% Response.end
end if

'### Returns List of Your Buddies
strSql = "SELECT " & strMemberTablePrefix & "Buddys.Buddy_ID, " & strMemberTablePrefix & "Buddys.budmemberid, " & strMemberTablePrefix & "Buddys.budbudid, " & strMemberTablePrefix & "members.m_name, " & strMemberTablePrefix & "members.member_id"
strSql = strSql & " FROM ("& strMemberTablePrefix & "Members INNER JOIN " & strMemberTablePrefix & "Buddys ON " & strMemberTablePrefix & "Members.Member_ID=" & strMemberTablePrefix & "Buddys.budbudID)"
strSql = strSql & " where ("& strMemberTablePrefix & "Buddys.budmemberid=" & getmemberID(strDBNTUserName) & ")"
rs.Open strSQL, my_Conn
'###

'### Returns Buddies Who Are Online
strSqlOnline = "SELECT " & strMemberTablePrefix & "MEMBERS.M_NAME," & strMemberTablePrefix & "ONLINE.M_BROWSE"
strSqlOnline = strSqlOnline & " FROM (" & strMemberTablePrefix & "ONLINE INNER JOIN " & strMemberTablePrefix & "MEMBERS ON " & strMemberTablePrefix & "ONLINE.UserID =" & strMemberTablePrefix & "MEMBERS.M_NAME) INNER JOIN " & strMemberTablePrefix & "BUDDYS ON " & strMemberTablePrefix & "MEMBERS.MEMBER_ID = " & strMemberTablePrefix & "BUDDYS.BUDMEMBERID"
'###

rsOnline.open strSqlOnline, my_Conn

%>
<table align="center" border="0" cellPadding="0" cellSpacing="0" width="100%" bgcolor="<%= strTableBorderColor %>">
<tr bgcolor="<%= strTableBorderColor %>">
<td bgcolor="<% =strHeadCellColor %>" align="center" width="100"><font face="<% =strDefaultFontFace %>" color="<% =strHeadFontColor %>" size="<% =strFooterFontSize %>"><b>Contact</b></font></td>
<td bgcolor="<% =strHeadCellColor %>" align="center"><font face="<% =strDefaultFontFace %>" color="<% =strHeadFontColor %>" size="<% =strFooterFontSize %>"><b>Buddy</b></font></td>
<td bgcolor="<% =strHeadCellColor %>" align="center"><font face="<% =strDefaultFontFace %>" color="<% =strHeadFontColor %>" size="<% =strFooterFontSize %>"><b>Online Status</b></font></td>
</tr>

<%
If rs.Eof OR rs.Bof Then
Response.Write "<tr><td colspan=3 bgcolor='" & strForumCellColor & "'><font face='" & DefaultFontFace & "' size='2'><b>No Buddies Found</b></font></td></tr>"
Else


' List buddies


do until rs.eof

if not rsOnline.eof then
if rsOnline("M_NAME")= rs("m_name") then
onlinestatus = rsonline("M_BROWSE")
rsOnline.movenext
else
onlinestatus = "Offline"
end if
end if

if xx=0 then
CColor = strAltForumCellColor

else
CColor = strForumCellColor

End if
strSql3 = "SELECT " & strMemberTablePrefix & "MEMBERS.MEMBER_ID, " & strMemberTablePrefix & "MEMBERS.M_NAME, " & strTablePrefix & "ONLINE.UserID "
strSql3 = strSql3 & " FROM " & strTablePrefix & "MEMBERS, " & strTablePrefix & "ONLINE "
strSql3 = strSql3 & " WHERE " & strMemberTablePrefix & "MEMBERS.M_NAME = '" & rs("M_NAME") & "' "
set rsMember = my_Conn.Execute (strSql3)
'### Added for Icons
strSql2 = "SELECT " & strMemberTablePrefix & "MEMBERS.MEMBER_ID, " & strMemberTablePrefix & "MEMBERS.M_STATUS, " & strMemberTablePrefix & "MEMBERS.M_NAME, " & strMemberTablePrefix & "MEMBERS.M_LEVEL, " & strMemberTablePrefix & "MEMBERS.M_EMAIL, " & strMemberTablePrefix & "MEMBERS.M_COUNTRY, " & strMemberTablePrefix & "MEMBERS.M_HOMEPAGE, " & strMemberTablePrefix & "MEMBERS.M_ICQ, " & strMemberTablePrefix & "MEMBERS.M_YAHOO, " & strMemberTablePrefix & "MEMBERS.M_AIM, " & strMemberTablePrefix & "MEMBERS.M_TITLE, " & strMemberTablePrefix & "MEMBERS.M_POSTS, " & strMemberTablePrefix & "MEMBERS.M_LASTPOSTDATE, " & strMemberTablePrefix & "MEMBERS.M_LASTHEREDATE, " & strMemberTablePrefix & "MEMBERS.M_DATE "
strSql2 = strSql2 & " FROM " & strMemberTablePrefix & "MEMBERS WHERE " & strMemberTablePrefix & "MEMBERS.MEMBER_ID =" & rsMember("MEMBER_ID")

set rs2 = my_Conn.Execute (strSql2)
'###
%>
<td align="left" bgcolor="<%=Ccolor%>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strDefaultFontColor %>"></font>
<a href="privatesend.asp?method=Topic&mname=<% =rsMember("M_NAME") %>"><img src="<%=strImageURL %>icon_pm_new.gif" alt="Send <% = ChkString(rsMember("M_NAME"),"display") %> a Private Message" border="0" hspace="4"></a>

<% if strICQ = "1" and Trim(rs2("M_ICQ")) <> "" then %>
<a href="JavaScript:openWindow('pop_messengers.asp?mode=ICQ&ICQ=<% =ChkString(rs2("M_ICQ"), "JSurlpath") %>&M_NAME=<% =ChkString(rsMember("M_NAME"),"display") %>')"><img src="http://online.mirabilis.com/scripts/online.dll?icq=<% =chkstring(rs2("M_ICQ"), "urlpath") %>&img=5" height="15" width="15" alt="Send <% =ChkString(rsMember("M_NAME"),"display") %> an ICQ Message" border="0" hspace="4"></a>

<% end if %>

<% if strYAHOO = "1" and Trim(rs2("M_YAHOO")) <> "" then %>
<a href="JavaScript:openWindow('http://edit.yahoo.com/config/send_webmesg?.target=<% =ChkString(rs2("M_YAHOO"), "JSurlpath") %>&.src=pg')">
<img src="http://opi.yahoo.com/online?u=<%=rs2("M_YAHOO")%>&m=g" border="0" alt="Send <% =ChkString(rsMember("M_NAME"),"display") %> a Yahoo message" hspace="4"></a>


<% end if %>

<% if strAIM = "1" and Trim(rs2("M_AIM")) <> "" then %>
<a href="JavaScript:openWindow('pop_messengers.asp?mode=AIM&AIM=<% =ChkString(rs2("M_AIM"), "JSurlpath") %>&M_NAME=<% =ChkString(rsMember("M_NAME"),"JSurlpath") %>')"><img src="icon_aim.gif" height="15" width="15" alt="Send <% =ChkString(rsMember("M_NAME"),"display") %> an AOL instant message" border="0" hspace="4"></a>


<% end if %>
</td>
<%
Response.Write "<td bgcolor='" & CColor & "' align=center><font face='" & strDefaultFontFace & "' color=" & strForumFontColor & " size='2'>"
Response.Write "<a href='pop_profile.asp?mode=display&id=" & rs("BudbudID") & "'>" & FormatStr(left(rs("m_name"), 50)) & "</a></b><font size=-2>"
Response.Write "<TD bgcolor=" & CColor & " align=center><font face=" & strDefaultFontFace & " color=" & strForumFontColor & " size=2>" & OnlineStatus & "</td>"
Response.Write "</tr>"
rs.MoveNext
rsMember.movenext
rs2.movenext
onlinestatus = "Offline"
xx=xx+1
If xx=2 then
xx=0
end if
loop
End If
%>
<tr>




</table>

Go to Top of Page

bcales
Starting Member

10 Posts

Posted - 03 April 2002 :  14:37:11  Show Profile
!!!!GOT IT !!!!

'### Returns Buddies Who Are Online
strsqlonline = "SELECT " & strMemberTablePrefix & "MEMBERS.M_NAME, " & strMemberTablePrefix & "ONLINE.M_BROWSE, " & strMemberTablePrefix & "BUDDYS.BUDMEMBERID"
strsqlonline = strsqlonline & " FROM " & strMemberTablePrefix & "BUDDYS INNER JOIN (" & strMemberTablePrefix & "ONLINE INNER JOIN " & strMemberTablePrefix & "MEMBERS ON " & strMemberTablePrefix & "ONLINE.USERID = " & strMemberTablePrefix & "MEMBERS.M_NAME) ON " & strMemberTablePrefix & "BUDDYS.BUDBUDID = " & strMemberTablePrefix & "MEMBERS.MEMBER_ID"
strsqlonline = strsqlonline & " WHERE (((" & strMemberTablePrefix & "BUDDYS.BUDMEMBERID)=" & getmemberID(strDBNTUserName) & "));"
'###

Thanks for all your help

Go to Top of Page

crash
Advanced Member

Netherlands
2064 Posts

Posted - 03 April 2002 :  15:06:06  Show Profile  Visit crash's Homepage
i didn't write that code nathan



Crash's Site | Crash is from
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.48 seconds. Powered By: Snitz Forums 2000 Version 3.4.07