PDA

View Full Version : Miscellaneous Hacks - IWT - Time Spent Online


Ideal Web Tech
05-23-2010, 10:00 PM
Notice
There are two versions of this modification. This is the vBulletin 3.8 version, you can find the vBulletin 4.x version here: https://vborg.vbsupport.ru/showthread.php?t=238154

Current Stable Version
Version 1.2.5

What is it?
This modification will add a counter to your forums that will record/track how much time your users have spent online. And output it in various sections of the site (EX: Time Online: 5 Months 2 Weeks 1 Day 15 Hours 44 Minutes 33 Seconds).

Features
Total Time Online in Postbit & Ministats block in the profile
Average Time Online (Per Day) in Postbit & Ministats block in the profile
Leader Board Displaying Time Online & Average Time Online (Per Day) for all the sites members
Cumulative Time Online on Leader Board & Stats box of FORUMHOMEDemo
You can see this product in action here (http://www.eXtremeGameZone.com).

Settings
Admin Control Panel Options to Toggle:
Entire System
Show Total Time in Postbit/Profile
Show Average Time Per Day in Postbit/Profile
Use Short Phrases (Ex. "1 Min 5 Secs" instead of "1 Minute 5 Seconds")
Use Micro Phrases in Postbit (Ex. "32d 12h 44m")
Display Cumulative Time Online on Leader Board/Forumhome
Leader Board/Navbar Link EnabledInstallation/Upgrade
See included file.

Release NotesVersion 1.1.1
Added the average time per day function
Added 4 settings used for controlling display of the Time Online and Avg. Time Online for both profile and postbit.
A few optimizations for memory/performanceVersion 1.2.0
Added Leader Board Displaying Time Online & Average Time Online (Per Day) for all the sites members
Added Cumulative Time Online on Leader Board
Added Cumulative Time Online on Stats box of FORUMHOME
Added Numerous new settings for controlling the systemVersion 1.2.1
Fixed a Bug resulting in the timestamp for date installed not setting correctly.Version 1.2.2
Updated postbit template code.Version 1.2.3
Added Postbit Micro Phrases
Added Template GroupVersion 1.2.4
Moved functions to a file.
Added Time Spent Online to the Who's Online.
vBulletin 3.8 Version ReleasedVersion 1.2.5
Fixed a timestamp flaw in the average time spent online function.Known Bugs
Currently none.Resolved Bugs
Function definition problem causing scripts that utilized the postbit factory without the vbulletin global file being initialized, such as the vBcms commenting engine, to display errors. (version 1.2.0)
Bug resulting in the timestamp for date installed not setting correctly. (version 1.2.1)Planned additions
We currently are talking about making an average time per day (similiar to the posts per day) (Added in version 1.1.1)
We also have plans to make a leaderboard for so people can see who spends the most time floating around the site. (Added in version 1.2.0)
We are planning to add in more settings at some point to give quite a bit more control over the system.(Added in version 1.2.0)

Support
This modification is released for free and as such we don't officially support it, but as time permits we will try to offer support on it. You are more likely to get a response over at our site as we wont be checking this thread frequently.

This modification brought to you by Ideal Web Technologies (http://www.idealwebtech.com/).

Floris
05-25-2010, 02:59 PM
Excellent, very cool addon :D

I wish I had this since the day I started my first forum :D

Megatr0n
05-25-2010, 04:25 PM
Question: if someone has been online for only day or a single month will it display "day/month" instead of "days/months"?

Ideal Web Tech
05-25-2010, 05:43 PM
Question: if someone has been online for only day or a single month will it display "day/month" instead of "days/months"?

Yes.

Megatr0n
05-26-2010, 04:26 PM
Thank you.

What does Display Cumulative Time Online mean?

Ideal Web Tech
05-26-2010, 05:20 PM
Thank you.

What does Display Cumulative Time Online mean?

It will display "the sum of all member's time online" on the forumhome and/or leaderboard.

funmasti
05-30-2010, 09:50 AM
Thanks.. Installed!

mimi123
07-05-2010, 12:11 PM
what about an addon where it shows real time of login time say a user logs in today since 6 pm and still is on while the time is 7:30pm and it will say on his profile user is online 1 hour 30 min 20 sec

i dont want a mod that guesses the average time online spent perday i want a mod that tells me about an online user of how long have they been online for today once they log off the time is 0..

any mod like this?

imedic
07-06-2010, 05:12 PM
Suggestions:
1. I think you miss in template: iwt_timespentonline_leaderboard the footer: $footer
Works much better with this addition.
In rest is working great, just as it was said before I wish I have it 3 years ago :)

2. I have also modified phrase Cumulative User Time Online from July 2010 as the calculation begins when you install it.

3. You could add a math script and approximate form user posts an average previous time (before installation of this mod) because it is obvious that many have already forums and users for some time.
Like posts X 2 min or also evaluate form total number of posts (if many) to add additional time as more posts are more you need to read. Just an approximation but can be something.
Good job :)

4. I don't know if this hides the statistical data of being online if the users is hidden? I suggest to have it hidden (all information) as is obvious that a hidden user don't want other to know how much and when he is online.

Hellmaster
07-06-2010, 05:41 PM
Installed, wait a few days to see how does it work... I hope stadistics are exact.

Cool mod.

imedic
07-07-2010, 03:10 PM
It seems statistics in first day is not so accurate but after next day it comes much closer to reality. Average will become real in some days...

Did anyone think a user seeing how much time he spend online he might decide to come not so often?

Ideal Web Tech
07-09-2010, 12:47 PM
It seems statistics in first day is not so accurate but after next day it comes much closer to reality. Average will become real in some days...

Did anyone think a user seeing how much time he spend online he might decide to come not so often?

The stats the first day are spot on accurate, the reason they don't look accurate is that most people expect the numbers to get smaller when divided out, but because you are dividing by less than a whole day, your are actually multiplying.

EX. If I spend 6 hours of the 12 hours its been installed online, then mathematically, you would get that I spend an average of 12 ( (6/12)*24 ) hours online per day. However, after a couple of days, if I have only spent 12 hours online, then you would see that I only spend 6 ( (12/48)*24) hours online each day.

As far as making the users come less often, I haven't heard any cases of that, but I have heard cases of users competing for most time online.

imedic
07-12-2010, 10:11 AM
...
As far as making the users come less often, I haven't heard any cases of that, but I have heard cases of users competing for most time online.

:D:D:D
I have already addiction problem on forum. I even created a Detox ban where user is banned for 10 days only upon request so he can take a break :)
Many thanks, counter is counting and I new the mathematical calculation, just
I think I have a bug affecting calculations on forum. I had users banned on 15 points where automatic ban goes on at 20. Also total time at begging seems a bit off, but this is because of my bug not because of your mod.

Great one, damn if I had this 3 years ago now I had total time more than a century :)

muratcan25
08-08-2010, 07:00 PM
Thank you

imedic
12-28-2010, 06:57 AM
It would have been great if there is an option for an user to hide he-s time online...
Thanks again for the mod.

need2fart
01-13-2011, 06:43 AM
When I installed this it overwritten my past time spent online. That was a month. :|

kimdk
02-02-2011, 03:45 AM
Thanks :) This mod is cool!

I agree with the others, it's pretty addictive! I have disabled the display of "show in postbits and profiles and no link in Navbar"

I think i will drop the bomb for my members until the modification has been active for a week or so. I think it will be quite entertaining to see their reaction!

I installed it on two forums vb 3.7.4 and 3.8.6, works perfect!

Mgudizayn
06-09-2012, 09:57 PM
thank u man it's very nice share :)