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)
 Members online above topics in forum.asp
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

tduffy
Junior Member

146 Posts

Posted - 21 October 2002 :  16:59:57  Show Profile
Hi, I have the latest version of snitz forums installed, also with the active users mod.

I was wondering if it would be possible to list the members that are online right between the site header and where the topics start.

Here's an example of what i'd like:


If anyone could help me out with this, i'd really appreciate it.

Edited by - tduffy on 22 October 2002 02:54:01

tduffy
Junior Member

146 Posts

Posted - 22 October 2002 :  13:22:02  Show Profile
anyone know how to do this? I'm thinking it might be possible to use some of the code from inc_activeusers.asp, but i'm not too savvy when it comes to this.
Go to Top of Page

paulnickell
Starting Member

USA
32 Posts

Posted - 22 October 2002 :  16:49:42  Show Profile  Visit paulnickell's Homepage
Actually, I'd like to do something similar. I want to add the link to the Active Users page in the top menu (header), which is EASY, but I want it to work with the config - in otherwords, I only want it to be a link if they are registered users (that's how I have my Active Users setup).
Any help would be appreciated here too.
Paul
Go to Top of Page

tduffy
Junior Member

146 Posts

Posted - 23 October 2002 :  22:45:53  Show Profile
anyone? Please?
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 24 October 2002 :  08:40:15  Show Profile
Rather than merely adding a list above the forum list, this method appends a tabled display below the forums. Above the WriteFooter line (appx 582)in default.asp, add an include to the activeusers.asp.


%>
<!--#include file="inc_activeusers.asp"-->
<%

In inc_activeusers.asp, to limit the display to registered users:

Line 38, add the following

if mLev > 0 then

Immediately above the very last line (191 in my copy) where it has 

%>

insert the following:

end if
Go to Top of Page

paulnickell
Starting Member

USA
32 Posts

Posted - 25 October 2002 :  19:08:38  Show Profile  Visit paulnickell's Homepage
quote:
Originally posted by Carefree

Rather than merely adding a list above the forum list, this method appends a tabled display below the forums. Above the WriteFooter line (appx 582)in default.asp, add an include to the activeusers.asp.


%>
<!--#include file="inc_activeusers.asp"-->
<%

In inc_activeusers.asp, to limit the display to registered users:

Line 38, add the following

if mLev > 0 then

Immediately above the very last line (191 in my copy) where it has 

%>

insert the following:

end if




Foregive me for my ignorance, but this wouldn't follow throughout the forums though, would it? Like it would if it were part of the Footer or Header.
Paul
Go to Top of Page

tduffy
Junior Member

146 Posts

Posted - 26 October 2002 :  04:08:40  Show Profile
thanks, but i was looking for something that could be displayed on top of the forum.asp page
Go to Top of Page

ZeroAvengerX
Starting Member

USA
48 Posts

Posted - 04 November 2002 :  00:45:16  Show Profile  Visit ZeroAvengerX's Homepage  Send ZeroAvengerX an AOL message  Send ZeroAvengerX a Yahoo! Message
yeah i got a really nice organized one for ya...

make a new file called "inc_activeusers2.asp"

inside it paste this code
quote:

<%
'#################################################################################
'## Copyright (C) 2000-01 Michael Anderson and Pierre Gorissen
'##
'## This program is free software; you can redistribute it and/or
'## modify it under the terms of the GNU General Public License
'## as published by the Free Software Foundation; either version 2
'## of the License, or any later version.
'##
'## All copyright notices regarding Snitz Forums 2000
'## must remain intact in the scripts and in the outputted HTML
'## The "powered by" text/logo with a link back to
'## http://forum.snitz.com in the footer of the pages MUST
'## remain visible when the pages are viewed on the internet or intranet.
'##
'## This program is distributed in the hope that it will be useful,
'## but WITHOUT ANY WARRANTY; without even the implied warranty of
'## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
'## GNU General Public License for more details.
'##
'## You should have received a copy of the GNU General Public License
'## along with this program; if not, write to the Free Software
'## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
'##
'## Support can be obtained from support forums at:
'## http://forum.snitz.com
'##
'## Correspondence and Marketing Questions can be sent to:
'## reinhold@bigfoot.com
'##
'## or
'##
'## Snitz Communications
'## C/O: Michael Anderson
'## PO Box 200
'## Harpswell, ME 04079
'#################################################################################

bolOverride = chkAUPermissions(strAUAnonOverride)
bolPanel = chkAUPermissions(strAUPAllow)
bolAUPage = chkAUPermissions(strAUAllow)

'## Ls3k - Before we can do anything we need to get rid of those slackers who have left ;)
deleteInactiveUsers()

'## Ls3k - Lest first deal with members logged in - for them we need to join with the members table.
intTotalActiveUsers = 0
intActiveMembers = 0
intActiveAnonMembers = 0
intActiveGuests = 0

strSql = "SELECT ME.MEMBER_ID, ME.M_NAME, ME.M_AUHIDE, ME.M_LEVEL " & _
"FROM " & strTablePrefix & "ACTIVE_USERS AU, " & strMemberTablePrefix & "MEMBERS ME " & _
"WHERE AU.MEMBER_ID = ME.MEMBER_ID"
set rsAM = my_conn.execute (strSql)
if rsAM.EOF or rsAM.BOF then
rsAM.close
set rsAM = nothing
else
do until rsAM.EOF
intTotalActiveUsers = intTotalActiveUsers + 1
if (rsAM("M_AUHIDE")="1" or isNull(rsAM("M_AUHIDE"))) or strAUAnon = 0 or bolOverride then
intActiveMembers = intActiveMembers + 1
if strActiveMemberList <> "" then
strActiveMemberList = strActiveMemberList & " | " & VBNewLine
end if
if strUseExtendedProfile then
strActiveMemberList = strActiveMemberList & "<a href=""pop_profile.asp?mode=display&id="& rsAM("MEMBER_ID") & """>"
else
strActiveMemberList = strActiveMemberList & "<a href=""JavaScript:openWindow2('pop_profile.asp?mode=display&id=" & rsAM("MEMBER_ID") & "')"">"
end if
strActiveMemberList = strActiveMemberList & "<font color=""" & strDefaultFontColor & """>"
if rsAM("M_LEVEL") = 2 then
strActiveMemberList = strActiveMemberList & "<font color=""" & strAUModColor & """>"
elseif rsAM("M_LEVEL") = 3 then
strActiveMemberList = strActiveMemberList & "<font color=""" & strAUAdminColor & """>"
end if
strActiveMemberList = strActiveMemberList & rsAM("M_NAME")
if rsAM("M_LEVEL") = 2 or rsAM("M_LEVEL") = 3 then
strActiveMemberList = strActiveMemberList & "</font>"
end if
strActiveMemberList = strActiveMemberList & "</font>"
strActiveMemberList = strActiveMemberList & "</a>"
else
intActiveAnonMembers = intActiveAnonMembers + 1
end if
rsAM.movenext
loop
rsAM.close
set rsAM = nothing
end if

'## Ls3k - Now lets count those peskey guests.
strSql = "SELECT COUNT(AU_IP) AS CNT FROM " & strTablePrefix & "ACTIVE_USERS WHERE MEMBER_ID = -1"
set rs = my_conn.execute (strSql)
intActiveGuests = rs("CNT")
rs.close
set rs = nothing
intTotalActiveUsers = intTotalActiveUsers + intActiveGuests

'## Ls3k - Ok, now it is time to check the record, cause it would be cool if we broke it!
chkAURecord(intTotalActiveUsers)

if strAUPCollapse then
if request("HideActiveUsers") = "Y" then
response.cookies(strUniqueID & "HideActiveUsers") = "Y"
response.cookies(strUniqueID & "HideActiveUsers").expires = dateAdd("d", 30, strForumTimeAdjust)
else
if request("HideActiveUsers") = "N" then
response.cookies(strUniqueID & "HideActiveUsers") = "N"
response.cookies(strUniqueID & "HideActiveUsers").expires = dateAdd("d", 30, strForumTimeAdjust)
end if
end if
end if
response.write " <table border=0 width=""100%"" cellspacing=1 cellpadding=4>" & VBNewLine
if bolPanel then
if strAUPCollapse="0" or request.cookies(strUniqueID & "HideActiveUsers") = "N" or request.cookies(strUniqueID & "HideActiveUsers") = "" then
response.write " <tr>" & VBNewLine & _
" <td bgcolor=""" & strForumCellColor & """ width=""10px"">" & VBNewLine & _
" " & getCurrentIcon(strIconGroup,"","") & VBNewLine & _
" </td>" & VBNewLine & _
" <td bgcolor=""" & strForumCellColor & """ colspan=""" & sGetColspan(6,5) & """>" & VBNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>" & VBNewLine & _
" " & fLang(strLangMOD_Ls3kAU_00100) & ": "
if intActiveMembers > 0 then
response.write strActiveMemberList & VBNewLine
else
response.write fLang(strLangMod_Ls3kAU_00110) & VBNewLine
end if
response.write " </font>" & VBNewLine & _
" </td>" & VBNewLine & _
" </tr>"
end if
end if
%>


save it with the other files for your forum

then open "forum.asp"
search for this code
quote:

" <input type=""hidden"" name=""Cookie"" value=""1"">" & vbNewLine & _
" </td></form>" & vbNewLine & _
" </tr>" & vbNewLine


DIRECTLY below it place this
quote:
%><!--#include file="inc_activeusers2.asp"--><%

and... well you get exactly what tduffy asked for... with an extra icon for decoration, but it functions the way he wanted...

Now about the Members Only thing... i really dont know... sorry, i will work on it though
Go to Top of Page

ZeroAvengerX
Starting Member

USA
48 Posts

Posted - 04 November 2002 :  00:49:34  Show Profile  Visit ZeroAvengerX's Homepage  Send ZeroAvengerX an AOL message  Send ZeroAvengerX a Yahoo! Message
ok yeah i get it, for a members only version of what i just posted use this code in inc_activeusers2.asp

quote:

<%
'#################################################################################
'## Copyright (C) 2000-01 Michael Anderson and Pierre Gorissen
'##
'## This program is free software; you can redistribute it and/or
'## modify it under the terms of the GNU General Public License
'## as published by the Free Software Foundation; either version 2
'## of the License, or any later version.
'##
'## All copyright notices regarding Snitz Forums 2000
'## must remain intact in the scripts and in the outputted HTML
'## The "powered by" text/logo with a link back to
'## http://forum.snitz.com in the footer of the pages MUST
'## remain visible when the pages are viewed on the internet or intranet.
'##
'## This program is distributed in the hope that it will be useful,
'## but WITHOUT ANY WARRANTY; without even the implied warranty of
'## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
'## GNU General Public License for more details.
'##
'## You should have received a copy of the GNU General Public License
'## along with this program; if not, write to the Free Software
'## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
'##
'## Support can be obtained from support forums at:
'## http://forum.snitz.com
'##
'## Correspondence and Marketing Questions can be sent to:
'## reinhold@bigfoot.com
'##
'## or
'##
'## Snitz Communications
'## C/O: Michael Anderson
'## PO Box 200
'## Harpswell, ME 04079
'#################################################################################
if mLev > 0 then
bolOverride = chkAUPermissions(strAUAnonOverride)
bolPanel = chkAUPermissions(strAUPAllow)
bolAUPage = chkAUPermissions(strAUAllow)

'## Ls3k - Before we can do anything we need to get rid of those slackers who have left ;)
deleteInactiveUsers()

'## Ls3k - Lest first deal with members logged in - for them we need to join with the members table.
intTotalActiveUsers = 0
intActiveMembers = 0
intActiveAnonMembers = 0
intActiveGuests = 0

strSql = "SELECT ME.MEMBER_ID, ME.M_NAME, ME.M_AUHIDE, ME.M_LEVEL " & _
"FROM " & strTablePrefix & "ACTIVE_USERS AU, " & strMemberTablePrefix & "MEMBERS ME " & _
"WHERE AU.MEMBER_ID = ME.MEMBER_ID"
set rsAM = my_conn.execute (strSql)
if rsAM.EOF or rsAM.BOF then
rsAM.close
set rsAM = nothing
else
do until rsAM.EOF
intTotalActiveUsers = intTotalActiveUsers + 1
if (rsAM("M_AUHIDE")="1" or isNull(rsAM("M_AUHIDE"))) or strAUAnon = 0 or bolOverride then
intActiveMembers = intActiveMembers + 1
if strActiveMemberList <> "" then
strActiveMemberList = strActiveMemberList & " | " & VBNewLine
end if
if strUseExtendedProfile then
strActiveMemberList = strActiveMemberList & "<a href=""pop_profile.asp?mode=display&id="& rsAM("MEMBER_ID") & """>"
else
strActiveMemberList = strActiveMemberList & "<a href=""JavaScript:openWindow2('pop_profile.asp?mode=display&id=" & rsAM("MEMBER_ID") & "')"">"
end if
strActiveMemberList = strActiveMemberList & "<font color=""" & strDefaultFontColor & """>"
if rsAM("M_LEVEL") = 2 then
strActiveMemberList = strActiveMemberList & "<font color=""" & strAUModColor & """>"
elseif rsAM("M_LEVEL") = 3 then
strActiveMemberList = strActiveMemberList & "<font color=""" & strAUAdminColor & """>"
end if
strActiveMemberList = strActiveMemberList & rsAM("M_NAME")
if rsAM("M_LEVEL") = 2 or rsAM("M_LEVEL") = 3 then
strActiveMemberList = strActiveMemberList & "</font>"
end if
strActiveMemberList = strActiveMemberList & "</font>"
strActiveMemberList = strActiveMemberList & "</a>"
else
intActiveAnonMembers = intActiveAnonMembers + 1
end if
rsAM.movenext
loop
rsAM.close
set rsAM = nothing
end if

'## Ls3k - Now lets count those peskey guests.
strSql = "SELECT COUNT(AU_IP) AS CNT FROM " & strTablePrefix & "ACTIVE_USERS WHERE MEMBER_ID = -1"
set rs = my_conn.execute (strSql)
intActiveGuests = rs("CNT")
rs.close
set rs = nothing
intTotalActiveUsers = intTotalActiveUsers + intActiveGuests

'## Ls3k - Ok, now it is time to check the record, cause it would be cool if we broke it!
chkAURecord(intTotalActiveUsers)

if strAUPCollapse then
if request("HideActiveUsers") = "Y" then
response.cookies(strUniqueID & "HideActiveUsers") = "Y"
response.cookies(strUniqueID & "HideActiveUsers").expires = dateAdd("d", 30, strForumTimeAdjust)
else
if request("HideActiveUsers") = "N" then
response.cookies(strUniqueID & "HideActiveUsers") = "N"
response.cookies(strUniqueID & "HideActiveUsers").expires = dateAdd("d", 30, strForumTimeAdjust)
end if
end if
end if
response.write " <table border=0 width=""100%"" cellspacing=1 cellpadding=4>" & VBNewLine
if bolPanel then
if strAUPCollapse="0" or request.cookies(strUniqueID & "HideActiveUsers") = "N" or request.cookies(strUniqueID & "HideActiveUsers") = "" then
response.write " <tr>" & VBNewLine & _
" <td bgcolor=""" & strForumCellColor & """ width=""10px"">" & VBNewLine & _
" " & getCurrentIcon(strIconGroup,"","") & VBNewLine & _
" </td>" & VBNewLine & _
" <td bgcolor=""" & strForumCellColor & """ colspan=""" & sGetColspan(6,5) & """>" & VBNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>" & VBNewLine & _
" " & fLang(strLangMOD_Ls3kAU_00100) & ": "
if intActiveMembers > 0 then
response.write strActiveMemberList & VBNewLine
else
response.write fLang(strLangMod_Ls3kAU_00110) & VBNewLine
end if
response.write " </font>" & VBNewLine & _
" </td>" & VBNewLine & _
" </tr>"
end if
end if
end if
%>



if anyone has any problems with this mod feature thing whatever
e-mail me ZeroAvengerX@Hotmail.com
i should be able to figure it out
Go to Top of Page

ZeroAvengerX
Starting Member

USA
48 Posts

Posted - 04 November 2002 :  00:59:33  Show Profile  Visit ZeroAvengerX's Homepage  Send ZeroAvengerX an AOL message  Send ZeroAvengerX a Yahoo! Message
paulnikell asked for a link in the header, i got it for ya :-D

in inc_header.asp find this:
quote:

<a href=""active.asp""" & dWStatus("See what topics have been active since your last visit...") & " tabindex=""-1""><acronym title=""See what topics have been active since your last visit..."">Active Topics</acronym></a>" & vbNewline


directly under it put this coding
quote:

if mLev > 0 then
Response.Write " |" & vbNewline & _
" <a href=""active_users.asp""" & dWStatus("Check who is browsing the forum with you!") & " tabindex=""-1""><acronym title=""Check who is browsing the forum with you!"">Active Users</acronym></a>" & vbNewline
end if


this will make a link to the active users page that can ONLY be seen after a user logs in!
Go to Top of Page

tduffy
Junior Member

146 Posts

Posted - 04 November 2002 :  01:08:16  Show Profile
thank you much!!! i will try it out now!!
Go to Top of Page

ZeroAvengerX
Starting Member

USA
48 Posts

Posted - 04 November 2002 :  01:28:31  Show Profile  Visit ZeroAvengerX's Homepage  Send ZeroAvengerX an AOL message  Send ZeroAvengerX a Yahoo! Message
sure no problem
Go to Top of Page

tduffy
Junior Member

146 Posts

Posted - 04 November 2002 :  02:31:31  Show Profile
To the moderator here:
This could probably be moved to the mod forum with code.

If anyone wants to see a demo of this in action check it out HERE
Go to Top of Page

havvoc
New Member

92 Posts

Posted - 04 November 2002 :  13:40:03  Show Profile
Hey tduffy, If you want to get rid of your ghosts in active users, you need to modify the code so it makes a seperate list. Anywhere the code defines the list just add another letter to it.
example:
intActiveMembers = intActiveMembers + 1
if strActiveMemberLista <> "" then
strActiveMemberLista = (strActiveMemberLista & " | ") & VBNewLine
end if

if strUseExtendedProfile then
strActiveMemberLista = strActiveMemberLista &

This will make another list and you won't have the double logins in active users
Go to Top of Page

tduffy
Junior Member

146 Posts

Posted - 04 November 2002 :  14:25:04  Show Profile
quote:
Originally posted by havvoc

Hey tduffy, If you want to get rid of your ghosts in active users, you need to modify the code so it makes a seperate list. Anywhere the code defines the list just add another letter to it.
example:
intActiveMembers = intActiveMembers + 1
if strActiveMemberLista <> "" then
strActiveMemberLista = (strActiveMemberLista & " | ") & VBNewLine
end if

if strUseExtendedProfile then
strActiveMemberLista = strActiveMemberLista &

This will make another list and you won't have the double logins in active users

which file do I make this change in? The inc_activeusers2.asp, that is on the top of the page, or inc_activeusers.asp, which is towards the bottom of default.asp?
Go to Top of Page

havvoc
New Member

92 Posts

Posted - 04 November 2002 :  14:32:31  Show Profile
Make your changes to inc_activeusers2.asp
Anywhere you find : strActiveMemberList change it to strActiveMemberLista
and that should take care of it
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 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.32 seconds. Powered By: Snitz Forums 2000 Version 3.4.07