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)

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 Code:

<?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

Quote:

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.

Airs 04-13-2003 05:27 PM

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

Quote:

08-30-02 at 01:12 AM Souly said this in Post #69
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:
PHP Code:

        $daysregs floor((time() - $lead[2]) / 86400); 

change it to: [installtimestamp=yourtimestampyou must change it manually]
PHP Code:

          $daysregs floor((time() - installtimestamp) / 86400); 

I have Start the Tool now, an now is Linuxtime=1030666140 - also my Code is
PHP Code:

          $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/...tinfo&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?


Quote:

04-22-03 at 04:14 AM kdog316 said this in Post #267
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/...tinfo&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


All times are GMT. The time now is 09:09 PM.

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.01324 seconds
  • Memory Usage 1,755KB
  • 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
  • (4)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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