View Full Version : Total Time Online Hack v1.0
matthepepe
11-21-2002, 04:36 AM
Nevermind forget that ... i got it now .. i forgot to look at the original post bit.
Molok
12-17-2002, 11:44 AM
I think its only a little problem what i have here.
when I Click on a Username in the Total Time Online Statistik i becomes a message thats the user is not registrated an so it have no Profil ?
How I can fix this problem ?
How could I make it so if you're in usergroupid=X and you are invisible, the time is not added on?
MetroSports82
01-05-2003, 01:28 PM
Sorry, bit late here eh? never got a chance to install this. works great for 2.2.9. anyway just wanted to say, awesome hack g-force2k2!! :)
S1R1US
02-05-2003, 04:32 AM
I get database error when try to install it. After I followed instructions exactly before i started on templates i went to the forum and forums didn't work. Had database error.
i'm trying it on v2.2.9 btw
Does it not work on 2.2.9 or something? If thats not the reason then look forward to your response on why get database error.
i got it in 2.2.9 with little problems. only problem i got is on the postbit under report this post and ip logged, it just has a link "Time Online:" and nothing else. anyone know what could be causing this?
----------
k i found the problem. if anyone is having trouble getting this to work in the postbit, refer to Post #18 (https://vborg.vbsupport.ru/showthread.php?postid=292022#post292022)
:)
S1R1US
02-10-2003, 12:06 AM
how do i do this?
Queries to Run (1)
// +++++++++++++++++++++
ALTER TABLE user ADD timeonline int(10) NOT NULL DEFAULT '0'
Also when someone says run the file to install from the admincp how do i do that? Thanks.
i did it in phpMyAdmin. which I just discovered yesterday lol. there are other ways but i couldn't tell you. just ask your hosting provider where phpMyAdmin is in your website directory or if tehy can install it and tehn go into it and run the querie:
ALTER TABLE user ADD timeonline int(10) NOT NULL DEFAULT '0'
i'm bad at explaining it. sorry.
S1R1US
02-12-2003, 06:45 AM
i have no clue what phpMyAdmin is and u didn't really help because all u said was go into it and run the queries. but i don't know how to run the query's. It must be done in AdminCP since thats what it said in the instuctions so where do i go in AdminCP and how do i do it? THanks.
Ok, here's a better response. Straight from Logician's (https://vborg.vbsupport.ru/member.php?s=&action=getinfo&userid=2355) "How To Install a vbulletin Hack: Guide to Newbies. (https://vborg.vbsupport.ru/showthread.php?s=&threadid=39142)"
10- Sometimes a hack may require you run a SQL command. Before running SQL queries in your MYSQL database make sure you backed up your database. To run SQL queries you have 3 options:
Your server may have an utility like "PHPmyAdmin" to run SQL queries. You can use these utilities.
You can use this vbulletin hack (https://vborg.vbsupport.ru/showthread.php?s=&threadid=26272) which helps you run SQL queries via Your VB Admin Control Panel
You can use this small independent script (https://vborg.vbsupport.ru/showthread.php?s=&threadid=38262) which have the same feature.
If you contact your host, they may be able to set up phpMyAdmin on your server. If so, then please view the attached image to see where you will enter the query. Simply enter it and click go. :)
ranger2kxlt
02-12-2003, 01:19 PM
Love the idea of the hack but i dont want it to display the amount of time online anywhere except when i rollover a users name in the whos online box on the main forum page or on the whosonline page. How would i go about doing this? Thanks.
Silenced Soul
02-23-2003, 05:47 AM
S1R1US, make a file called:
totalquery.php and put the following code in it:
<?php
error_reporting(7);
require("./global.php");
cpheader("<title>Run a Query</title>");
$totalquery = "ALTER TABLE user ADD timeonline int(10) NOT NULL DEFAULT '0'";
$DB_site->query($totalquery);
echo "Query successful.<br>";
echo "<font face='Courier New' size='1'>$totalquery</font><br><br>";
echo "Do not forget to delete this file...";
cpfooter();
?>
Upload it to your admincp, run the file, and then delete it. This will run the query directly through the admin cp, therefore bypassing any need for phpMyadmin or any other query running program, although, I highly recommend getting phpMyadmin or one of the several Query DB hacks floating around.
LangTuDaTinh
03-13-2003, 06:17 AM
Originally posted by N9ne
How could I make it so if you're in usergroupid=X and you are invisible, the time is not added on?
have not do this yet but i added an option in usercp edit option where user can choose whether to display their total time online or not
the default is on but if they select no, total time online will be disappear in all (include in their profile(or getinfo), time learder, and their posts) and only usergroupid ==6 can view all user's timeonline even if they disable it in their usercp.
even if they disable timeonline in their usercp, their time still adding.
pattox
03-16-2003, 12:20 PM
What if I dont want to show the days? How would I need to modify the code? I just want it to continue counting the hours. and if possible to stop counting seconds when it reaches 24 hours.
Hi i was installing the hack and all and got this error
Error
SQL-query : [Edit]
ALTER TABLE user ADD timeonline int
(10) NOT NULL DEFAULT \'0\'
MySQL said:
You have an error in your SQL syntax near '\'0\'' at line 2
in phpmyadmin can anyone please help? and great hack!.
Craigr
04-13-2003, 06:12 PM
08-30-02 at 01:12 AM Souly said this in Post #69 (https://vborg.vbsupport.ru/showthread.php?postid=292642#post292642)
I have do the follow to calculate a correct "Time Online Per Day".
First you need the Timestamp (LINUX) before you start to install my changes! ! !
in timeonline.php find:
$daysregs = floor((time() - $lead[2]) / 86400);
change it to: [installtimestamp=yourtimestampyou must change it manually]
$daysregs = floor((time() - installtimestamp) / 86400);
I have Start the Tool now, an now is Linuxtime=1030666140 - also my Code is
$daysregs = floor((time() - 1030666140) / 86400);
And don?t look on my bad english - first learn german :lick:
Thanks, this works well on my forum. The 'time online per day' was starting from when my forum first opened so the values were very low, but this sorted it out.
Thanks
Craig
kdog316
04-22-2003, 02:14 AM
when i try to go to my profile i get this erorr
Database error in vBulletin 2.3.0:
Invalid SQL: SELECT * FROM storeextra WHERE action='midi' AND userid='1'
mysql error: Table 'kdog316_vb.storeextra' doesn't exist
mysql error number: 1146
Date: Monday 21st of April 2003 07:12:03 PM
Script: http://www.allaroundsite.com/forums/forums/member.php?s=&action=getinfo&userid=1
Referer: http://www.allaroundsite.com/forums/
Intex
04-27-2003, 06:05 PM
Great hack g-force2k2. Worked great running 2.2.6 with the zero.php instructions to fix the divide by zero problem.
/me clicks install.
Intex
04-27-2003, 06:09 PM
Not sure but it doesn't look like this hack caused that particular problem. I remember there was a hack that allowed you to play a midi file in your profile. It looks like, from the SQL statement, that this table is missing.
Perhaps you were installing this hack at the same time or didn't include the query from that hack and have never been to the profile since its installation?
04-22-03 at 04:14 AM kdog316 said this in Post #267 (https://vborg.vbsupport.ru/showthread.php?postid=385390#post385390)
when i try to go to my profile i get this erorr
Database error in vBulletin 2.3.0:
Invalid SQL: SELECT * FROM storeextra WHERE action='midi' AND userid='1'
mysql error: Table 'kdog316_vb.storeextra' doesn't exist
mysql error number: 1146
Date: Monday 21st of April 2003 07:12:03 PM
Script: http://www.allaroundsite.com/forums/forums/member.php?s=&action=getinfo&userid=1
Referer: http://www.allaroundsite.com/forums/
trafix
04-27-2003, 11:07 PM
I realy dont want to install this hack for 2 reasons....
1) I dont want my members to suddenly leave the site if they realise they have been there for some time.
2) My wife will fill me cos she will know exactly how much time is spend working on the site :)
Might install at a later date
Alien
04-28-2003, 08:11 AM
Has the original install file ever been modified to the version that TECK had spoken about that would involve absolutely ZERO queries at all?
It was mentioned here:
https://vborg.vbsupport.ru/showthread.php?postid=302011#post302011
I'm interested in installing this with zero queries, if it is definatly possible to do so. Who wouldn't?
Thanks. :)
-Jason
PurpleCow
05-11-2003, 02:40 PM
Has anyone tested this to be working perfectly fine in ver2.3.0 ??
In the previous page someone said, it was working fine in 2.9.0 with some changes....how abt in ver2.3.0 ??
Thanks much
Alien
05-20-2003, 03:32 AM
Anyone know the status of the "0 queries version" mentioned by Teck in this thread? :) Where is everyone lately lol...
I got it that way (I think) with no problems. Although I only use it in the getinfo template due to some errors earlier on and me being too lazy to go back now and update my files.
I think it is all working by now though. Just read the post by TECK and I think it tells you what to do..
maxxxxxx
05-22-2003, 01:21 PM
Maybe i am a little bit stupid, but i dont know how i do not div with zero.
I mean this row:
$daysreg = iif($daysreg == 0,'1','$daysreg'); // checking to see if not registered for more then a day to prevent division by zero
in the timeonline.php.
It comes the warnig if i use the http://www.phonecity.de/forum/timeonline.php where you can see it.
Can somebody tell me how i can fix this
cu
Thomas
maxxxxxx
05-23-2003, 06:33 AM
I have a zero file in my zip file but the code in this file is:
ÐÏࡱá
cu
Thomas
maxxxxxx
05-23-2003, 10:04 AM
Ok gefunden... sorry :(
gruss
Thomas
maxxxxxx
05-24-2003, 11:58 AM
But i have still a problem with the by day table
look
http://www.phonecity.de/forum/timeonline.php
Best regards
Thomas
Alien
05-25-2003, 09:06 PM
This really needs updating. :) TECK's only includes hours, not minutes and seconds, and his is only within the postbit and also has no leaderboard. I would like to see this updated completely to use 0 queries but maintain all the functionality of the original hack.
I am not sure how to merge both these things into one hack, and I've tried myself without success. :(
mlevenson
05-25-2003, 10:39 PM
Maybe some will step up to the plate and revive this hack. I think it's a good one and I want to install it badly
obiwan8472
05-25-2003, 10:43 PM
Me too! This needs updating as its awesome! :D
DJ_aroms
05-26-2003, 05:58 PM
08-30-02 at 01:31 AM g-force2k2 said this in Post #71 (https://vborg.vbsupport.ru/showthread.php?postid=292648#post292648)
aight... for all the ppl that feel cheated... here's a code i devised for ya...no the counter isn't buggy because it uses the joindate :p but here's a little code i whipped up for ppl like you that feel cheated :p regards...
open timeonline.php
find:
$daysregs = floor((time() - $lead[2]) / 86400);
replace with:
// Time Online Hack Addon (fair time per day?) g-force2k2
$fairtime = 1030505285;
if($joindate < $fairtime) {
$daysregs = floor((time() - $fairtime) /86400);
} else {
$daysregs = floor((time() - $lead[2]) / 86400);
}
// Time Online Hack Addon (fair time per day?) g-force2k2
should really change those values up for ya now ;) regards...
g-force2k2 This nor the other $fairtime value work for me. The Online per day is still counted from the register date.
Any ideas? Thanks. Great Hack (if i can just get this working!!)
obiwan8472
05-27-2003, 10:57 PM
how much server load does this hack generate?
if its counting each member all the time it makes me wonder.
thanx
maxxxxxx
07-31-2003, 02:17 PM
Hello,
i have found the error in the code here is the correct working file
while($lead = $DB_site->fetch_array($leadtime)) {
$userid = $lead[0]; $username = $lead[1]; $joindate = vbdate($dateformat,$lead[2]); $timeonline = dotimeonline($lead[3]); $posts = $lead[4];
$daysregs = floor((time() - $lead[2]) / 86400);
if($daysregs == 0) { // checking to see if not registered for more then a day to prevent division by zero
$daysreg = 1;
} else {
$daysreg = $daysregs;
}
$dotimeperday = floor($lead[3] / $daysreg);
$timeperday = dotimeonline($dotimeperday);
eval("\$time_leader.= \"".gettemplate("time_leader")."\";");
}
These are the rows 38 - 49
you can test it under www.phonecity.de/forum/timeonline.php
Regards
Thomas
legendarysk8er
09-03-2003, 01:42 AM
Does this hack start counting AFTER you've installed it or does it accumulate it all together from the past too?
wolfe
09-11-2003, 12:25 AM
i have converted this hack to vB 3.0.0 but i will not release untill i have permission off g-force2k2 and vB.org i have added a few extras such as Total To Show where you can pick how many you want to display on the page. also i have added sort by were you can pick what you want to sort it by eg username, timeonline etc. i have also removed the old page navs and intergrated it with the new and proper perpage nav
preview in the attachment...
legendarysk8er
09-19-2003, 08:42 PM
Does this hack start counting AFTER you've installed it or does it accumulate it all together from the past too?
Can someone answer my question and does this work for vB 2.3.2?
Marzas
09-19-2003, 10:26 PM
cool hack, installed perfectly
legendarysk8er
09-22-2003, 12:14 AM
*BUMP*
Can someone get back to me on my question?
legendarysk8er
09-27-2003, 11:59 AM
*bump*
What the hell g-force, stop being so lazy and answer my question..
I've got a weird problem.
I've installed this hack yesterday @2.2.7, works fine.
but, only one user has got a very fast clock ;)
every second, his online time changes 3 or 4 hours :D
what can it be ?
bada_bing
02-18-2004, 04:09 PM
Will this work with VB 2.3.4 running vportal 3.0b?
Marzas
03-13-2004, 10:09 PM
hey i need help fast.
Whenever my users get to about 15 hours online, the timeonline leaderboard puts them onto the last page and changes their time online to about -4 days and so.
How can this be fixed? I have other hacks installed but i checked, and its not interfearing with anything.
Marzas
03-16-2004, 04:52 AM
i need help on this? Where are you G-force?
John Diver
03-17-2004, 03:00 PM
Is anyone having a problem with the hack not counting members as online at a certain time?
I think its up to around 10am GMT that the hack doesnt count anyone as online.
For example before 10am I saw 4 members online, but the number of active users today was showing as 0
I have seen this a good few times now, I think it happens everyday from a certain time until around 10am
Marzas
03-18-2004, 06:28 AM
its like the owner has ditched the hack....
Hello? people need help here?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.