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 Customization
 New Topic  Topic Locked
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 2

soxc
New Member

53 Posts

Posted - 05 November 2003 :  14:37:23  Show Profile
I don't think this file will exist is middleweb's build:
<!--#include file="inc_activeusers_data.asp"-->
Basically is will just grab the data to poulate the count vars:

intActiveMembers
intActiveGuests
intTotalActiveUsers
Go to Top of Page

DavidRhodes
Senior Member

United Kingdom
1222 Posts

Posted - 05 November 2003 :  16:48:36  Show Profile
okay, i didn't create the file, I thought it was with Au4?

anyway, create file inc_activeusers_data.asp as
<%
'#################################################################################
'## 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 ORDER BY ME.M_NAME"
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)
%>

The UK MkIVs Forum
Go to Top of Page

middleweb
Junior Member

USA
230 Posts

Posted - 14 November 2003 :  21:19:56  Show Profile  Visit middleweb's Homepage
Hm sorry. I seem to be having a little trouble, where exactly am I supposed to make the changes that David noted in his last reply? Inc_header.asp? If so, I'm not really seeing that anywhere. [:s] Thanks!

Go to Top of Page

soxc
New Member

53 Posts

Posted - 15 November 2003 :  09:14:55  Show Profile
The last reply is the code for the file that is included in the page. You need to create a file called "inc_activeusers_data.asp" and paste the code that is in his message.
Go to Top of Page

xx ENIGMA xx
Junior Member

166 Posts

Posted - 15 November 2003 :  21:38:40  Show Profile  Send xx ENIGMA xx an AOL message
quote:
Originally posted by DavidRhodes

Try this


' Get Private Message count for display
if strDBType = "access" then
	strSqL = "SELECT count(M_TO) as [pmUserCount] "
else
	strSqL = "SELECT count(M_TO) as pmUserCount "
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)
pmUserCount = rsPM("pmUserCount")
rsPM.close
set rsPM = nothing
%><!--#include file="inc_activeusers_data.asp"--><%
'## Forum_SQL - Get newest membername and id from DB

strSql = "SELECT M_NAME, MEMBER_ID FROM " & strMemberTablePrefix & "MEMBERS " &_
" WHERE M_STATUS = 1 AND MEMBER_ID > 1 " &_
" ORDER BY MEMBER_ID desc;"

set rs = Server.CreateObject("ADODB.Recordset")
rs.open TopSQL(strSql,1), my_Conn

if not rs.EOF then
	NewMember_Name = chkString(rs("M_NAME"), "display")
	NewMember_Id = rs("MEMBER_ID")
else
	NewMember_Name = ""
end if

rs.close
set rs = nothing
	
Response.Write	"				<table border=""0"" width=""100%"" cellspacing=""0"" cellpadding=""0"">" &vbCrLf &_
		"				<tr>" &vbCrLf &_
		"					<td bgcolor=""" & strTableBorderColor & """>" &vbCrLf &_		
		"						<TABLE WIDTH=""100%"" BORDER=""0"" CELLSPACING=""1"" CELLPADDING=""4"">" &vbCrLf &_
		"						<TR>" &vbCrLf &_
		"							<TD align=""left"" bgcolor="""& strHeadCellColor &""" nowrap valign=""top""><font face="""& strDefaultFontFace &""" size="""& strDefaultFontSize &""" color="""& strCategoryFontColor &"""> </font></td>" &vbCrLf &_
		"						</TR>" &vbCrLf &_	
		"						<TR>" &vbCrLf &_
		"							<TD align=""left"" bgcolor="""& strForumCellColor &""" nowrap valign=""top""><font size="""& strFooterFontSize &""">" &_
		"								[ <a href=""active_users.asp"">Active Users</a>: "& intActiveMembers &" | Guests: "& intActiveGuests &" ] [ Total: "& intTotalActiveUsers &" ] "

if NewMember_Name <> "" then 
	Response.Write	"[ Newest Member: <span class=""spnMessageText"">" & profileLink(NewMember_Name,NewMember_Id) & " ]</span>" & vbNewline
end if
Response.Write  "[ "
if pmUserCount >=1 then
	Response.Write "<font color=""" & strActiveLinkColor & """><b>" & pmUserCount & "</b></font>"
else
	Response.Write pmUserCount
end if
Response.Write	" new <span class=""spnMessageText""><a href=""pm_view.asp"">message"
if pmUserCount <>1 then
	Response.Write	"s"
end if
Response.Write	"</a></span> | <span class=""spnMessageText""><a href=""javascript:openWindowPager('pm_pop_pager.asp')"">pager</a></span> ]"

Response.Write	"							</font></td>" &vbCrLf &_
		"						</TR>" &vbCrLf &_		
		"						</table>" &vbCrLf &_
		"					</td>" &vbCrLf &_
		"				</tr>" &vbCrLf &_
		"				</table>" &vbCrLf	




what file is this inserted into and where exactly
into that file? I guess I didnt follow it either middleweb


my little forum playground

Go to Top of Page

middleweb
Junior Member

USA
230 Posts

Posted - 15 November 2003 :  21:47:35  Show Profile  Visit middleweb's Homepage
I meant the first bit of code that he posted, sorry.
And uhh..anyone wanna field this one? lol www.middle-web.com/forum3
Thanks!
-Gabe

Go to Top of Page

xx ENIGMA xx
Junior Member

166 Posts

Posted - 15 November 2003 :  21:51:10  Show Profile  Send xx ENIGMA xx an AOL message
nevermind, I see or I guess I see it goes in default.asp

correct me if I'm wrong please

at least I seem to have got it working putting it
just under this in default.asp at the top

%>
<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="inc_func_secure.asp" -->
<!--#INCLUDE FILE="inc_sha256.asp"-->
<!--#INCLUDE FILE="inc_header.asp" -->
<!--#INCLUDE FILE="inc_func_member.asp" -->
<!--#INCLUDE FILE="inc_moderation.asp" -->
<!--#INCLUDE FILE="inc_subscription.asp" -->
<%


my little forum playground


Edited by - xx ENIGMA xx on 15 November 2003 21:52:23
Go to Top of Page

xx ENIGMA xx
Junior Member

166 Posts

Posted - 15 November 2003 :  21:54:07  Show Profile  Send xx ENIGMA xx an AOL message
quote:
Originally posted by middleweb


And uhh..anyone wanna field this one? lol www.middle-web.com/forum3
Thanks!
-Gabe



From trial and error with myself over the past few days,
I am betting if you remove that whole line
'####################################
then your problem will be solved

at minimum it will then point you to a new error then


my little forum playground


Edited by - xx ENIGMA xx on 15 November 2003 21:54:29
Go to Top of Page

DavidRhodes
Senior Member

United Kingdom
1222 Posts

Posted - 17 November 2003 :  03:30:06  Show Profile
The first code I posted goes in inc_header.asp after the code to create the menu (at the top right). Not sure the exact line number but i've just done a view source of this page and it need to go after:

<br /><a href="JavaScript:openWindow5('pop_printer_friendly.asp?TOPIC_ID=48788')"><img src="icon_print.gif" width="16" height="17" border="0" alt="" title="" align="absmiddle" /></a> <a href="JavaScript:openWindow5('pop_printer_friendly.asp?TOPIC_ID=48788')">Printer Friendly</a>
          </font></td>
        </tr>
      </table>
    </td>
  </tr>
</table>


obviously this code will be in response.write statements in your ASP though.


The second code I posted must go into a new file called inc_activeusers_data.asp.

The UK MkIVs Forum
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Previous 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.29 seconds. Powered By: Snitz Forums 2000 Version 3.4.07