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)

NTLDR 08-28-2002 08:11 PM

I have put the display of the time online in the postbit along with the number of posts etc, how easy would it be to just change this display H:M:S (Hours:Mins:Seconds) instead of 0 Hours, 0 Minutes, 0 Seconds Online?

Goldknight 08-28-2002 08:12 PM

Great job as you always do =D

/me install

Goldknight 08-28-2002 08:14 PM

Quote:

Originally posted by NTLDR
I have put the display of the time online in the postbit along with the number of posts etc, how easy would it be to just change this display H:M:S (Hours:Mins:Seconds) instead of 0 Hours, 0 Minutes, 0 Seconds Online?
I d like to have that one too

ExAvIoUr 08-28-2002 08:18 PM

me too if thats possible.

g-force2k2 08-28-2002 08:24 PM

its pretty simple guys ;) just open up the admin/functions.php and go down the the function that i created... just change Days to D... Hours to H... Minutes to M and Seconds to S :p its that simple and it'll change up for all three setups like that :) enjoy

err... edit nvm i see what you mean :p give me a minute and i'll create the setup for you :) regards...

g-force2k2

NTLDR 08-28-2002 08:31 PM

I thought it was that code but was't 100% ;)

I have copied the function and changed it to:

PHP Code:

// +++++++ Start Time Online Hack [ g-force2k2 ] +++++++
// do time online function
  
function doposttimeonline($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:";

    
$totmin = (($hours 3600) + ($days 86400));
    
$newmin $timeonline $totmin;
    
$minutes floor($newmin 60);
    
$ftime.= "$minutes:";

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

    return 
$ftime;

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

And placed it under the other one and changed:

PHP Code:

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

To:

PHP Code:

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

So I get H:M:S (eg: 0:44:10) in the post bit and the full length version everywhere else.

Thanks again g-force2k2, if Hack of the month comes back this will be my nomination :D

g-force2k2 08-28-2002 08:37 PM

heh good job man :p here's a more modified code and it'll change it everywhere on the forum and i think you wanted it to look more like this anyway :p but you can just add this as a new function like you stated if you want that ;) regards...

g-force2k2

g-force2k2 08-28-2002 08:39 PM

Quote:

Originally posted by NTLDR
Thanks again g-force2k2, if Hack of the month comes back this will be my nomination :D
thanks ;) i owe you one :) regards...

g-force2k2

Goldknight 08-28-2002 08:40 PM

Thanks g-force2k2 :)

:banana:

NTLDR 08-28-2002 08:45 PM

Quote:

Originally posted by g-force2k2
thanks ;) i owe you one :)
No problem, this hack is the best I have seen in ages, I've allways wanted it since someone requested it ages ago, and you have done a superb job. Your one of the top hackers here g-force2k2 and a credit to vB.org :)


All times are GMT. The time now is 10:35 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.01351 seconds
  • Memory Usage 1,757KB
  • 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
  • (3)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