vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Total Time Online Hack v1.0 (https://vborg.vbsupport.ru/showthread.php?t=42864)

Kars10 08-30-2002 06:38 PM

Quote:

Originally posted by g-force2k2
hmm... i'll look into both issues...

Minifreunde make sure that you made the fix on the earlier posts... the links nextpage and the others i forgot to end with </a> could be a problem ;) it was fixed but perhaps you downloaded before hand... regards...

g-force2k2

Hello G!
I downloadet the latest of youre versions, and here is the Link correct (the </a> appears). Ive done anything the manual says, believe me...
And the problem PsYc speaks of, about the metarefresh i get too...my page reloads not....i must reload it with the Refrehbutton of the Browser... :(
This Hack is great, but this Problems are bad for me...

Regards. :)

bommelchen 08-30-2002 07:33 PM

I have a problem the time per day is always show 0 !!
Any idears ?

bommelchen

g-force2k2 08-30-2002 08:22 PM

bommelchen did you make the change on post#71?

Minifreunde i will look into it now... as for the metafresh i don't really know... but is it a problem? unless you're sitting their under the timonline.php seeing each user's time go up then its really only their for displaying the time leaders...

btw Psyc and Minifreunde does the time of the other users just not go up? or just not go up untill you revisit via another session? regards i will try to sort everything out... regards...

g-force2k2

PsYc 08-30-2002 08:51 PM

Quote:

btw Psyc and Minifreunde does the time of the other users just not go up? or just not go up untill you revisit via another session? regards i will try to sort everything out... regards...


yes the time of other go up, but i remember it went up if i reloaded the page before or in the postbit when they are online, but for now it only shows in a new session like you mentioned above


edit: and i only see my time increasing by sec and so on in postbit and on the timeonline.php

g-force2k2 08-30-2002 08:56 PM

Psyc but does there's go up at the same rate as yours or not? sorry for the trouble just trying to straighten things out :p regards...

g-force2k2

PsYc 08-30-2002 09:04 PM

no its no trouble ;)

we trouble you :)

yes my time goes up and theirs not

but in a new session i see their new online time but then its still no going up with mine at the same time

as you said only in a new session

g-force2k2 08-30-2002 09:05 PM

but is their time going up at an even rate? like when you go into a new session do they gain the exact amount of time that you do? regards...

g-force2k2

PsYc 08-30-2002 09:11 PM

yes its like everyone see his time increasing but not the time of others but for everyone it counts right just not visible if you refresh the page

only in a new session

g-force2k2 08-30-2002 09:14 PM

PsYc try adding this coding to the time template where you'd like it to appear ::

PHP Code:

<a href='$PHP_SELF?s=$session[sessionhash]&action=view_leader'>[ reload page ]</a

see if that fixes the probably instead of reloading click on the link ;) regards...

g-force2k2

PsYc 08-30-2002 09:21 PM

nope still the same problem

i know before some addons it worked, dont know why not now

here is my timeonline.php

maybe you see an error:

--------------------------------------------------

<?php

error_reporting(7);

/* Total Time Online Hack v1.0
Created on Thursday August 22, 2002
Copyright g-force2k2
Notice :: Please do not edit (including addons) this hack. Thanks for respecting my work! */

$templatesused = "time,time_leader";

require('./global.php');

// +++++++ Time Online Hack Configuration [ Edit Below Only ] +++++++
$usersperpage = "10"; // Configure this to show the number per page on the leader board!
// +++++++ Time Online Hack Configuration [ Don't Edit Below This Line ] +++++++

if(trim($action) == "") {
$action = "view_leader";
}

// +++++++ Start Viewing Total Time Online Users +++++++
if($action == "view_leader") {
$perpage = $usersperpage;
$totalusers = $DB_site->query_first("
SELECT COUNT(*) AS users
FROM user
WHERE timeonline > 0");
$totalpages = ceil($totalusers[0] / $perpage);
if($page == "") {
$page = 1;
}
$startat = ($page-1)*$perpage;
$leadtime = $DB_site->query("
SELECT userid, username, joindate, timeonline, posts
FROM user
WHERE userid!=0 AND timeonline > 0
ORDER by timeonline DESC LIMIT $startat,$perpage");
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];
$fairtime = 1030490880;
if($joindate < $fairtime) {
$daysregs = floor((time() - $fairtime) /86400);
} else {
$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")."\";");
}
if($page!=1) {
$prv = $page - 1;
$firstpage = "<a href='timeonline.php?s=$session[sessionhash]&action=view_leader&perpage=$perpage&page=1'\">[ Erste Seite ]</a>";
$prevpage = "<a href='timeonline.php?s=$session[sessionhash]&action=view_leader&perpage=$perpage&page=$prv' \">[ Vorherige Seite ]</a>";

}
if ($page!=$totalpages) {
$nxt = $page+1;
$nextpage = "<a href='timeonline.php?s=$session[sessionhash]&action=view_leader&perpage=$perpage&page=$nxt' \">[ Nächste Seite ]</a>";
$lastpage = "<a href='timeonline.php?s=$session[sessionhash]&action=view_leader&perpage=$perpage&page=$totalpa ges'\">[ Letzte Seite]</a>";
}
eval("dooutput(\"".gettemplate("time")."\");");
}

?>

---------------------------------------------------------

bommelchen 08-30-2002 09:21 PM

Quote:

bommelchen did you make the change on post#71?
Yes i have make the changes now and it is working but it is the same time like the total time !!!

Any idears?
bommelchen

g-force2k2 08-30-2002 09:25 PM

bommelchen can you give me a screenshot? thanks in advance...

PSYc see if you can undo the changes and see if it works again... if not then i will try and work something up... regards...

g-force2k2

PsYc 08-30-2002 09:56 PM

i used a new file than with the division by zero update

doesnt work


so i've uploaded my old timeonline.php i posted on page 6

hope you can find a clue

psyc :)

g-force2k2 08-30-2002 10:02 PM

i really can't see any problems at the moment PsYc... just so you know it doesn't calculate every second the user is online... its probably as close as you can get to the real time that they're online... it doesn't tally each second by second... it does use sessions to keep track of the time online... i don't know if that helps you in your explanation... but i will still be looking for a fix for the reloading issue... regards...

g-force2k2

PsYc 08-30-2002 10:05 PM

ah so you mean it shouldn't count every second of every member who is online?

only my time? so this is no error?

then you don't need to look at the code :)

sometimes i saw their secs move up and then not, this confused me a little

so if this is a desired behaviour its fine ;)

g-force2k2 08-30-2002 10:09 PM

well like it was stated it only counts the time online in a new session... hence another user's time won't be counted unless they complete a new session... and it keeps track by the modifiable timeout code that i created for the admin/sessions.php if you were to count every single second it would probably require enourmous amounts of sqls... here it works when they have a new session within a certain amount of time(time out time) they will recieve that time... it may not be perfect... but it is extremely close ;) regards... and sorry for all the troubles... but it does work no ;)

g-force2k2

PsYc 08-30-2002 10:16 PM

yes it works perfect as you said, so sorry for bothering you ;)


great support, this hack should be hack of the month :)

my nomination

g-force2k2 08-30-2002 10:21 PM

Quote:

Originally posted by PsYc
great support, this hack should be hack of the month :)

my nomination

thanks :) i really appreciate it ;)

g-force2k2

bommelchen 08-30-2002 11:35 PM

Quote:

PSYc see if you can undo the changes and see if it works again... if not then i will try and work something up... regards...
I have undo the changes and it works too..... is this ok?
I will wait for the next day and icheck it again !

bommelchen

Kars10 08-31-2002 06:09 AM

Quote:

Originally posted by g-force2k2
btw Psyc and Minifreunde does the time of the other users just not go up? or just not go up untill you revisit via another session? regards i will try to sort everything out... regards...

g-force2k2

Yeah the time goes up in a session. But the fact with the lost connection is still there.
The Links are permanetly down. Even the Backlink to my index.php (main-forumpage) is down too.
I made the changes in the second post (with the zero error) and thats all. All other changes i made was in youre manual... :bored:

Rock 08-31-2002 12:06 PM

Thanks alot! :D
Im actually installing the hack atm :D
cheerz and thx m8!

Rock 08-31-2002 01:03 PM

Damnm finished installing the hack, its working on timeonline.php, i can see all the results ,
but its not working @ Postbit ...
any ideas ??
it only apears like this:
:bunny:

KarateKid 08-31-2002 02:38 PM

I miss a

install.txt

in your zipped file!!

Goldknight 08-31-2002 03:31 PM

Quote:

Originally posted by Rock
Damnm finished installing the hack, its working on timeonline.php, i can see all the results ,
but its not working @ Postbit ...
any ideas ??
it only apears like this:
:bunny:

Did you add the new templates?

Goldknight 08-31-2002 03:33 PM

Quote:

Originally posted by KarateKid
I miss a

install.txt

in your zipped file!!

g-force2k2 have his own system.. check "install_timeonline.php" in the zip that he attach it at first post. It is "modify" install.txt. Open it up with any text editor and you will see the instruction inside.

g-force2k2 08-31-2002 03:40 PM

Minifreunde :: Attach your timeonline.php here and i will debug for you regards...

Rock :: what lines did you put in the admin/functions.php ?

KarateKid :: Goldknight is correct... the install_timeonline.php is the txt file... regards...

Goldknight :: thanks for the help :)

g-force2k2

Kars10 08-31-2002 04:31 PM

Quote:

Originally posted by g-force2k2
Minifreunde :: Attach your timeonline.php here and i will debug for you regards...

Rock :: what lines did you put in the admin/functions.php ?

KarateKid :: Goldknight is correct... the install_timeonline.php is the txt file... regards...

Goldknight :: thanks for the help :)

g-force2k2

Ok here it is!
Thanks... :D

g-force2k2 08-31-2002 05:08 PM

hmm... i just compared the files Minifreunde and i didn't see any difference... now you said that the links didn't work correctly yes? cause i uploaded your timeonline.php to my forum and it works fine... all five links work etc... so im not sure what to tell you? regards...

g-force2k2

KarateKid 08-31-2002 09:58 PM

thanks Goldknight,

I knew it. But I searched for this mentioned file. But its ok. I'll do it so :-)

LouChipher 09-01-2002 12:32 PM

Is it possible to add a history for every day with the top30 online users (very active guest possible, too)? and the day average, since instal the hack, new member from register date...

Rock 09-01-2002 02:11 PM

Quote:

Originally posted by g-force2k2
Minifreunde :: Attach your timeonline.php here and i will debug for you regards...

Rock :: what lines did you put in the admin/functions.php ?

KarateKid :: Goldknight is correct... the install_timeonline.php is the txt file... regards...

Goldknight :: thanks for the help :)

g-force2k2


Mate, i added the lines u said in the install file ...
Here they are:
Code:

File Modification (5)
// +++++++++++++++++++++
open admin/functions.php (2)

find: (1)

                $post[joindate]=vbdate($registereddateformat,$post[joindate]);

below it add:

// +++++++ Start Time Online Hack [ g-force2k2 ] +++++++
                $post[onlinetime] = dotimeonline($post[timeonline]);
// +++++++ Start Time Online Hack [ g-force2k2 ] +++++++

find: (2) (the second appeareance)

?>

above it add:

// +++++++ Start Time Online Hack [ g-force2k2 ] +++++++
// do time online function
  function dotimeonline($timeonline) {

    $days = floor($timeonline / 86400);
      if($days == 0) {
          $ftime = "";
        } elseif($days == 1) {
          $ftime = "$days Day, ";
        } else {
          $ftime = "$days Days, ";
        }
 
    $tothours = $days * 86400;
    $newhours = $timeonline - $tothours;
    $hours = floor($newhours / 3600);
    $ftime.= "$hours Hours, ";

    $totmin = (($hours * 3600) + ($days * 86400));
    $newmin = $timeonline - $totmin;
    $minutes = floor($newmin / 60);
    $ftime.= "$minutes Minutes, ";

    $totsec = (($hours * 3600) + ($minutes * 60) + ($days * 86400));
    $seconds = $timeonline - $totsec;
    $ftime.= "$seconds Seconds Online";

    return $ftime;

}
// +++++++ Start Time Online Hack [ g-force2k2 ] +++++++


Did exactly what u said on the install file...

Rock 09-01-2002 02:11 PM

Quote:

Originally posted by Goldknight


Did you add the new templates?

dUhhhh ...
Of course ...

wolfe 09-01-2002 03:27 PM

right i got a test for you

g-force2k2

is there anyway of adding a bit to the user.php file in the Admin CP so you can find users by time online and also mass delete them and mass email them by there time spent online :D this would be great if you can :D

wolfe 09-01-2002 03:34 PM

also i got it working Great hakc d00d :D:D

suzemir 09-01-2002 08:19 PM

great hack - i love it

thanks

groovesalad 09-01-2002 11:36 PM

Doesn't work. Here's what happens.

As soon as I edit admin/sessions.php from:

find: (1)

if ($session['styleid']!=0) {
$bbuserinfo['styleid'] = $session['styleid'];
}

to

// +++++++ Time Online Hack [ g-force2k2 ] +++++++
$inactivetime = 5; // Configure Time Out Time Here in Minutes!
$factivetime = $inactivetime * 60;
$newtime = time() - $bbuserinfo[lastactivity];
if($newtime < $factivetime) {
$DB_site->query("UPDATE user SET timeonline=timeonline+$newtime WHERE userid='$bbuserinfo[userid]'");
}
// +++++++ Start Time Online Hack [ g-force2k2 ] +++++++




I get this when my page loads:

There seems to have been a slight problem with the Groove-Salad database.
Please try again by pressing the refresh button in your browser.

An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists.

We apologise for any inconvenience.

Database error in vBulletin 2.2.6:

Invalid SQL: UPDATE user SET timeonline=timeonline+2 WHERE userid='3'
mysql error: Unknown column 'timeonline' in 'field list'

mysql error number: 1054

Date: Sunday 01st of September 2002 05:31:31 PM
Script: http://groove-salad.com/forum/forum/
Referer:




I don't understand why it's saying the script is at http://groove-salad.com/forum/forum/

Any help would be greatly appreciated.

Goldknight 09-01-2002 11:59 PM

Quote:

Originally posted by Rock


dUhhhh ...
Of course ...

Ok, I m going to let g-force2l2 care of this one..

later


bah

g-force2k2 09-02-2002 01:30 AM

groovesalad did you run the queries first? regards...

g-force2k2

wolfe 09-02-2002 01:33 AM

please help

https://vborg.vbsupport.ru/showthrea...943#post293943

groovesalad 09-02-2002 01:34 AM

gforce: sorry, new to this. How do I run a query?


All times are GMT. The time now is 04:19 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01587 seconds
  • Memory Usage 1,842KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (12)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete