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)
 Who's reading Topic ?
 New Topic  Reply to Topic
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 2

Webbo
Average Member

United Kingdom
982 Posts

Posted - 06 March 2011 :  04:13:24  Show Profile  Visit Webbo's Homepage  Reply with Quote
Too much time on my hands this morning

I've just added an 'Opt out' link so that members can remove themselves from the Active Users (basically a link to their edit profile where they will find the option to 'show on Active Users:'



if mlev > 0 then
strSql = "SELECT AU_LASTPAGE, AU_QUERYSTRING FROM " & strTablePrefix & "ACTIVE_USERS WHERE MEMBER_ID =" & MemberID
set rs=my_Conn.Execute(strSql)
if not rs.EOF then
strCurrentPage = rs("AU_LASTPAGE")
strQuery = rs("AU_QUERYSTRING")
rs.Close
end if
set rs=Nothing
strSql = "SELECT COUNT(MEMBER_ID) AS INTA FROM " & strTablePrefix & "ACTIVE_USERS WHERE AU_LASTPAGE = '" & strCurrentPage & "' AND AU_QUERYSTRING='" & strQuery & "'"
set rs=my_Conn.Execute(strSql)
if not rs.EOF then
intViewers = rs("INTA")
rs.Close
end if
set rs=Nothing
strSql = "SELECT COUNT(MEMBER_ID) AS INTG FROM " & strTablePrefix & "ACTIVE_USERS WHERE MEMBER_ID=-1 AND AU_LASTPAGE = '" & strCurrentPage & "' AND AU_QUERYSTRING='" & strQuery & "'"
set rs=my_Conn.Execute(strSql)
if not rs.EOF then
intGuests = rs("INTG")
rs.Close
end if
set rs=Nothing
strSql = "SELECT ME.MEMBER_ID, ME.M_AUHIDE, AU.AU_LASTPAGE, AU.AU_QUERYSTRING FROM " & strTablePrefix & "ACTIVE_USERS AU, " & strMemberTablePrefix & "MEMBERS ME WHERE ME.M_AUHIDE = '0' AND AU.MEMBER_ID = ME.MEMBER_ID AND AU.AU_LASTPAGE = '" & strCurrentPage & "' AND AU.AU_QUERYSTRING='" & strQuery & "'"
set rs = my_Conn.Execute(strSql)
if not rs.EOF then
rs.MoveFirst
intAnon=0
Do while not rs.EOF
intAnon=intAnon+1
rs.MoveNext
Loop
rs.Close
end if
set rs=Nothing
Response.Write "<table align=""center"" border=""0"" cellPadding=""1"" cellspacing=""0"" width=""95%"">" & vbNewLine & _
" <tr vAlign=""middle"">" & vbNewLine & _
" <td align=""left"" width=""100%"" bgcolor=""" & strTableBorderColor & """>" & vbNewLine & _
" <table border=""0"" width=""100%"" cellspacing=""0"" cellpadding=""4"" align=""center"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strForumCellColor & """>" & vbNewLine & _
" <font face="""& strDefaultFontFace & """ color=""" & strForumFontColor & """ size=""" & strDefaultFontSize & """>" & intViewers & "" & vbNewline
if intViewers = 1 then
Response.Write " user viewing this topic: "
else
Response.Write " users viewing this topic: "
end if
strSql = "SELECT ME.MEMBER_ID, ME.M_NAME, ME.M_AUHIDE, AU.AU_LASTPAGE, AU.AU_QUERYSTRING FROM " & strTablePrefix & "ACTIVE_USERS AU, " & strMemberTablePrefix & "MEMBERS ME WHERE ME.M_AUHIDE = '1' AND AU.MEMBER_ID = ME.MEMBER_ID AND AU.AU_LASTPAGE = '" & strCurrentPage & "' AND AU.AU_QUERYSTRING='" & strQuery & "'"
Set rs=my_Conn.Execute(strSql)
if not (rs.BOF or rs.EOF) then
rs.MoveFirst
Do While NOT rs.EOF
Response.Write "<a href=""pop_profile.asp?mode=display&id="&rs("MEMBER_ID") & """>" & rs("M_NAME") &"</a>, "
rs.MoveNext
Loop
end if
if cInt(intAnon) => 1 then
Response.Write " " & cInt(intAnon) & " anonymous "
end if
if intGuests = 1 then
Response.Write ", " & intGuests & " guest "
else if intGuests > 1 then
Response.Write ", " & intGuests & " guests "
end if
end if
Response.Write "<td align=""right"" bgcolor=""" & strForumCellColor & """>" & vbNewLine & _
"<font face="""& strDefaultFontFace & """ color=""" & strForumFontColor & """ size=""" & strFooterFontSize & """>" & vbNewline
if strUseExtendedProfile then
Response.Write " <a href=""pop_profile.asp?mode=Edit""" & dWStatus("Remove name from Active Users...") & " tabindex=""-1""><acronym title=""Remove name from Active Users..."">Opt out</acronym></a>" & vbNewline
else
Response.Write " <a href=""javascript:openWindow3('pop_profile.asp?mode=Edit')""" & dWStatus("Remove name from Active Users...") & " tabindex=""-1""><acronym title=""Remove name from Active Users..."">Opt out</acronym></a>" & vbNewline
end if
Response.Write "</tr>" & vbNewline
Response.Write "</td></tr></table>" & vbNewLine & _
"</td></tr></table><br>" & vbNewLine
end if




Or using the icon_group.gif instead of a text link (personally i prefer this as looks tidier....)

if mlev > 0 then
strSql = "SELECT AU_LASTPAGE, AU_QUERYSTRING FROM " & strTablePrefix & "ACTIVE_USERS WHERE MEMBER_ID =" & MemberID
set rs=my_Conn.Execute(strSql)
if not rs.EOF then
strCurrentPage = rs("AU_LASTPAGE")
strQuery = rs("AU_QUERYSTRING")
rs.Close
end if
set rs=Nothing
strSql = "SELECT COUNT(MEMBER_ID) AS INTA FROM " & strTablePrefix & "ACTIVE_USERS WHERE AU_LASTPAGE = '" & strCurrentPage & "' AND AU_QUERYSTRING='" & strQuery & "'"
set rs=my_Conn.Execute(strSql)
if not rs.EOF then
intViewers = rs("INTA")
rs.Close
end if
set rs=Nothing
strSql = "SELECT COUNT(MEMBER_ID) AS INTG FROM " & strTablePrefix & "ACTIVE_USERS WHERE MEMBER_ID=-1 AND AU_LASTPAGE = '" & strCurrentPage & "' AND AU_QUERYSTRING='" & strQuery & "'"
set rs=my_Conn.Execute(strSql)
if not rs.EOF then
intGuests = rs("INTG")
rs.Close
end if
set rs=Nothing
strSql = "SELECT ME.MEMBER_ID, ME.M_AUHIDE, AU.AU_LASTPAGE, AU.AU_QUERYSTRING FROM " & strTablePrefix & "ACTIVE_USERS AU, " & strMemberTablePrefix & "MEMBERS ME WHERE ME.M_AUHIDE = '0' AND AU.MEMBER_ID = ME.MEMBER_ID AND AU.AU_LASTPAGE = '" & strCurrentPage & "' AND AU.AU_QUERYSTRING='" & strQuery & "'"
set rs = my_Conn.Execute(strSql)
if not rs.EOF then
rs.MoveFirst
intAnon=0
Do while not rs.EOF
intAnon=intAnon+1
rs.MoveNext
Loop
rs.Close
end if
set rs=Nothing
Response.Write "<table align=""center"" border=""0"" cellPadding=""1"" cellspacing=""0"" width=""95%"">" & vbNewLine & _
" <tr vAlign=""middle"">" & vbNewLine & _
" <td align=""left"" width=""100%"" bgcolor=""" & strTableBorderColor & """>" & vbNewLine & _
" <table border=""0"" width=""100%"" cellspacing=""0"" cellpadding=""4"" align=""center"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strForumCellColor & """>" & vbNewLine & _
" <font face="""& strDefaultFontFace & """ color=""" & strForumFontColor & """ size=""" & strDefaultFontSize & """>" & intViewers & "" & vbNewline
if intViewers = 1 then
Response.Write " user viewing this topic: "
else
Response.Write " users viewing this topic: "
end if
strSql = "SELECT ME.MEMBER_ID, ME.M_NAME, ME.M_AUHIDE, AU.AU_LASTPAGE, AU.AU_QUERYSTRING FROM " & strTablePrefix & "ACTIVE_USERS AU, " & strMemberTablePrefix & "MEMBERS ME WHERE ME.M_AUHIDE = '1' AND AU.MEMBER_ID = ME.MEMBER_ID AND AU.AU_LASTPAGE = '" & strCurrentPage & "' AND AU.AU_QUERYSTRING='" & strQuery & "'"
Set rs=my_Conn.Execute(strSql)
if not (rs.BOF or rs.EOF) then
rs.MoveFirst
Do While NOT rs.EOF
Response.Write "<a href=""pop_profile.asp?mode=display&id="&rs("MEMBER_ID") & """>" & rs("M_NAME") &"</a>, "
rs.MoveNext
Loop
end if
if cInt(intAnon) => 1 then
Response.Write " " & cInt(intAnon) & " anonymous "
end if
if intGuests = 1 then
Response.Write ", " & intGuests & " guest "
else if intGuests > 1 then
Response.Write ", " & intGuests & " guests "
end if
end if
Response.Write "<td align=""right"" bgcolor=""" & strForumCellColor & """>" & vbNewLine
if strUseExtendedProfile then
Response.Write " <a href=""pop_profile.asp?mode=Edit"" title=""Remove name from Active Users...""><img src=""icon_group.gif"" border=""0""></a>" & vbNewline
else
Response.Write " <a href=""javascript:openWindow3('pop_profile.asp?mode=Edit')""><title=""Remove name from Active Users...""><img src=""icon_group.gif"" border=""0""></a>" & vbNewline
end if
Response.Write "</tr>" & vbNewline
Response.Write "</td></tr></table>" & vbNewLine & _
"</td></tr></table><br>" & vbNewLine
end if

Edited by - Webbo on 06 March 2011 04:58:23
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 06 March 2011 :  04:57:19  Show Profile  Reply with Quote
The ability to opt out of Active Users is part of the original package. That's the only way to have "anonymous" users on Snitz.
Go to Top of Page

Webbo
Average Member

United Kingdom
982 Posts

Posted - 06 March 2011 :  05:00:54  Show Profile  Visit Webbo's Homepage  Reply with Quote
I know but adding the link to the members 'edit profile' will show users that they can opt out as I doubt many will know that the option is already in their profile
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 06 March 2011 :  06:54:13  Show Profile  Reply with Quote
quote:
Originally posted by Webbo
Do you want to package it and add it to SnitzBitz Craig ?



Done. Get a copy here.
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 06 March 2011 :  06:55:46  Show Profile  Reply with Quote
quote:
Originally posted by Webbo

I know but adding the link to the members 'edit profile' will show users that they can opt out as I doubt many will know that the option is already in their profile



I see what you're talking about (putting it in the viewing display). OK, I'll include it. Done. SnitzBitz file is modified.

Edited by - Carefree on 06 March 2011 07:18:52
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Previous Page
 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.15 seconds. Powered By: Snitz Forums 2000 Version 3.4.07