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: General / Current Version (Old)
 "Active Users + Visits Today"
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

tomasalsbro
Average Member

Sweden
818 Posts

Posted - 21 April 2001 :  06:25:53  Show Profile  Visit tomasalsbro's Homepage
Hi,
How do I do to have "Active Users + Visits Today" shown the way it does in this forum (under the Snitz Forums 2000 image at the top left)
Cheers / Tomas?

!-Keep distance in trafik-!
www.whiplash.pp.se

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 21 April 2001 :  06:49:56  Show Profile  Visit HuwR's Homepage
fisrstly , you need a global.asa file which contains the following code


<script language="vbscript" runat="server">
sub Session_OnStart
set Session("HistLog") = Server.CreateObject("Scripting.Dictionary")
Session("HistCount") = 0
end sub

sub Session_OnEnd
Session("HistCount") = nothing
set Session("HistLog") = nothing
end sub
</script>


Then place this code where you want it displayed.

<B><%= Application("ActiveUsers") %></B> Active Users
<B><%= Application("VisitorsToday") %></B> Visitors Today


Go to Top of Page

tomasalsbro
Average Member

Sweden
818 Posts

Posted - 21 April 2001 :  06:54:39  Show Profile  Visit tomasalsbro's Homepage
OK Huw,
any suggestions of were in the global.asa I should put the code?
Cheers / Tomas

!-Keep distance in trafik-!
www.whiplash.pp.se
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 21 April 2001 :  07:32:58  Show Profile  Visit HuwR's Homepage
If you already have a global asa, then you will need to check whether you already have a session_onstart and session_onend defined, if not simply insert the code at the end of your global.asa

If you already have the functions defined, then just copy the code from each of the functions, and insert it at the end of your existing functions

Go to Top of Page

tomasalsbro
Average Member

Sweden
818 Posts

Posted - 21 April 2001 :  08:07:28  Show Profile  Visit tomasalsbro's Homepage
OK Huw,
I have done what you suggested but there are no figures showing any visitors or active user.
Take a look here
http://www.whiplash.pp.se/forum/default.asp
Tomas

!-Keep distance in trafik-!
www.whiplash.pp.se
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 21 April 2001 :  08:46:30  Show Profile  Visit HuwR's Homepage
the global.asa should be in the root of your website, is that where you placed it.

The only problem with this mod, is it doesn't show you active and total users for the forum, but for the whole site.

Go to Top of Page

tomasalsbro
Average Member

Sweden
818 Posts

Posted - 21 April 2001 :  09:25:27  Show Profile  Visit tomasalsbro's Homepage
quote:

the global.asa should be in the root of your website, is that where you placed it.

The only problem with this mod, is it doesn't show you active and total users for the forum, but for the whole site.





OK Huw,
then it's nothing for me I guess.
Cheers / Tomas

!-Keep distance in trafik-!
www.whiplash.pp.se
Go to Top of Page

ki5ck
New Member

69 Posts

Posted - 05 May 2001 :  12:33:09  Show Profile  Visit ki5ck's Homepage
I have this added to my site, and I have the Global.asa (as listed above) in my web site root. I'm not getting any numbers, though. What should I check?



Paul Wood
SLT Webmaster
Go to Top of Page

ki5ck
New Member

69 Posts

Posted - 05 May 2001 :  17:07:59  Show Profile  Visit ki5ck's Homepage
Ah. Fixed it. I used a method I found on coveryourasp.com. Still not sure why I couldn't get the other method to work.



Paul Wood
SLT Webmaster
Go to Top of Page

MAD_PsyClown
Starting Member

Denmark
6 Posts

Posted - 15 May 2001 :  14:35:14  Show Profile  Visit MAD_PsyClown's Homepage  Send MAD_PsyClown an ICQ Message
Mine dosn't show any numbers either, can someone plz help me?

Go to Top of Page

whiterose
Starting Member

18 Posts

Posted - 18 May 2001 :  19:07:47  Show Profile  Visit whiterose's Homepage
what exactly is a global asa?

Go to Top of Page

mafifi
Junior Member

USA
308 Posts

Posted - 21 May 2001 :  21:08:02  Show Profile  Send mafifi an ICQ Message
Everything you need to know about Global.asa, but afraid to ask. Have fun!
http://www.asp101.com/resources/apps_sessions_gasa.asp

Thanks,

Mo
Go to Top of Page

mafifi
Junior Member

USA
308 Posts

Posted - 21 May 2001 :  21:35:10  Show Profile  Send mafifi an ICQ Message
Copy this code into a file and call it global.asa and place it into you Root directory.
 
<SCRIPT LANGUAGE="VBScript" RUNAT="Server">

Sub Application_OnStart
Application("ActiveUsers") = 0
Application("TodaysDate") = Date

End Sub

Sub Session_OnStart
If Application("VisitorsToday") = "" then
Application("VisitorsToday") = 0
end if
Session.Timeout = 10 ' minutes
Session("Start") = Now
Application.Lock
Application("ActiveUsers") = Application("ActiveUsers") + 1
if Application("TodaysDate") = Date then
Application("VisitorsToday") = Application("VisitorsToday") + 1
else
Application("TodaysDate") = Date
Application("VisitorsToday") = 1
end if
Application.UnLock
End Sub

Sub Session_OnEnd
' Decrease the active visitors count when the session ends.
Application.Lock
Application("ActiveUsers") = Application("ActiveUsers") - 1
Application.UnLock
End Sub

</SCRIPT>


Copy this code and put it where you want the information to show.

<%Response.Write "Active Users: " & Application("ActiveUsers") &" Visits Today: " & Application("VisitorsToday") %> 


I placed mine in the inc_top.asp at the end of line No. 137

<BR><BR><FONT FACE="Arial" SIZE="1"><%Response.Write "Active Users: " & Application("ActiveUsers") &" Visits Today: " & Application("VisitorsToday") %></FONT>


Thanks,

Mo
Go to Top of Page

NucleusWDS
Starting Member

United Kingdom
38 Posts

Posted - 23 May 2001 :  09:57:51  Show Profile  Visit NucleusWDS's Homepage  Send NucleusWDS an ICQ Message
Can some HELP Please ... I can't get VISITS TODAY to display numbers ...

Followed the instructions as above ...
Here check it out http://www.amd3d.com/forum



Edited by - NucleusWDS on 23 May 2001 09:58:34
Go to Top of Page

mafifi
Junior Member

USA
308 Posts

Posted - 24 May 2001 :  20:09:13  Show Profile  Send mafifi an ICQ Message
Correction. Place the following code at the end of line No. 114 NOT line 137, Sorry.
<BR><BR><FONT FACE="Arial" SIZE="1"><%Response.Write "Active Users: " & Application("ActiveUsers") &" Visits Today: " & Application("VisitorsToday") %></FONT>


Check mine. http://www.media-2000.com/forum/

If you still having problems I can e-mail you the whole inc_top.asp file.

Thanks,

Mo
Go to Top of Page

nalley
Starting Member

34 Posts

Posted - 24 May 2001 :  20:09:23  Show Profile
Hi NucleusWDS:

I went to your side and I noticed the active user in your fourm is seperated into members and guests two sections. I am wondering how can you do that? where you do get that code?

As to the VISITS TODAY, I don't recommend you to do show that number. I follow the step as above, and it did show the numbers, but as long as your server was down, even though just one second, the vists counts will be back to zero. That's why I have experienced.

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.62 seconds. Powered By: Snitz Forums 2000 Version 3.4.07