Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Total Time spent on the forum
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Total Time spent on the forum

 Post Reply Post Reply Page  12>
Author
leo View Drop Down
Newbie
Newbie
Avatar

Joined: 06 January 2008
Location: Rijeka
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote leo Quote  Post ReplyReply Direct Link To This Post Topic: Total Time spent on the forum
    Posted: 22 January 2008 at 8:00am
How can i add a total time spend on the forum (from the day the user joined ) on the member profile page or avator ?
Back to Top
leo View Drop Down
Newbie
Newbie
Avatar

Joined: 06 January 2008
Location: Rijeka
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote leo Quote  Post ReplyReply Direct Link To This Post Posted: 20 February 2008 at 2:20pm
like , a user A was totaly 100 hours on my forum , and he deserves a credit or something ?!
Back to Top
StarDust View Drop Down
Senior Member
Senior Member


Joined: 14 May 2007
Location: Bangladesh
Status: Offline
Points: 310
Post Options Post Options   Thanks (0) Thanks(0)   Quote StarDust Quote  Post ReplyReply Direct Link To This Post Posted: 20 February 2008 at 5:07pm
This sounds a nice idea.

Bruce, you should consider this.
Back to Top
Scotty32 View Drop Down
Moderator Group
Moderator Group


Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
Post Options Post Options   Thanks (0) Thanks(0)   Quote Scotty32 Quote  Post ReplyReply Direct Link To This Post Posted: 20 February 2008 at 7:16pm
This isnt exactly easy to do, when someone loads a page, thats it, they are disconnected from the server untill they go to another page.

Somebody could spend an hour on one page then go to another, or come back an hour later, and there would be no way of knowing which it was.

It is the same reason why Active Users displays people who was active within the last 20minutes, because it doesnt know if they're still on, or if they've left.
S2H.co.uk - WebWiz Mods and Skins

For support on my mods + skins, please use my forum.
Back to Top
StarDust View Drop Down
Senior Member
Senior Member


Joined: 14 May 2007
Location: Bangladesh
Status: Offline
Points: 310
Post Options Post Options   Thanks (0) Thanks(0)   Quote StarDust Quote  Post ReplyReply Direct Link To This Post Posted: 21 February 2008 at 7:54am
I think the possibilities lies in session functions.

We can track a user for how many minutes/hours he is on the site. We can store his user ID in the session vars.

For each session, after a session ends when wwf removes the active users entry from array/db, we can also open the profile table and increase the total amount of time spent on the site assuming there is already a field like totaltime in the tblAuthor.
Back to Top
StarDust View Drop Down
Senior Member
Senior Member


Joined: 14 May 2007
Location: Bangladesh
Status: Offline
Points: 310
Post Options Post Options   Thanks (0) Thanks(0)   Quote StarDust Quote  Post ReplyReply Direct Link To This Post Posted: 21 February 2008 at 7:55am
And of course no one wants to track down who are not logged in. If you want to get the benefits, you must be a member and logged in.
Back to Top
StarDust View Drop Down
Senior Member
Senior Member


Joined: 14 May 2007
Location: Bangladesh
Status: Offline
Points: 310
Post Options Post Options   Thanks (0) Thanks(0)   Quote StarDust Quote  Post ReplyReply Direct Link To This Post Posted: 22 February 2008 at 5:53am
A little more to add, I think.

A tiny javascript may help to determine exactly how much time someone expends on a page.

Session variables stored in application scope with 20 minutes of inactivity limit.

So we can deploy a common javascript confirm script with a count down timer which will execute in each 19 minutes. It will ask for a confirmation from the user after 19 minutes of staying on the same page asking like "Your login session will expire after 1 minute because you have no server activity for the last 19 minutes. Do you want to stay logged in?" [Yes/No]

If the user chooses yes, it will sent HTTP request to a page like session.asp which will once again execute common.asp and the functions needed for active users.

This way we cat track down almost exact time.
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 22 February 2008 at 8:46am
It's a good idea but would not be accurate as HTTP is a stateless protocol so there is no way to know if the person is still on the web site or not.

This means any active user is listed as active for 15 to 20 minutes after they last make an HTTP request, this would make such a feature completely in accurate. If someone comes to the board 3 times aday for 2 minutes they would need listed as being active for 60 minutes!

Also if it is a quiet web site the code to remove the inactive visitor would not be run until the next person came along. If this was 24 hours then the user would be listed as being active for 24 hours even if they only visited for 2 minutes!

I'm sure it could be done using AJAX to make active visitors more accurate but would also increase bandwidth and servers calls which can course issues on busy forums.

You would also need to run some type of schedule task to remove inactive users, as ASP doesn't have such a feature this would be very difficult to do without the interaction of a user clicking a page to course the action to run.

If this was PHP or ASP.NET then could possibly find away to work around all the issues, but I doubt it possible with ASP, although someone may come up with a way to do this and do it accurately, but I very much doubt it.


Edited by WebWiz-Bruce - 22 February 2008 at 8:50am
Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.