Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

Reply
 
Thread Tools
Minute Shift (for servers with slightly wrong times) Details »»
Minute Shift (for servers with slightly wrong times)
Version: 1.00, by filburt1 filburt1 is offline
Developer Last Online: May 2007 Show Printable Version Email this Page

Version: 2.3.x Rating:
Released: 03-13-2003 Last Update: Never Installs: 3
 
No support by the author.

This hack shifts all the dates that the forum displays (at least all those generated by vbdate(), which should be all of them) by a given number of minutes. For example, if you are on a shared server and the server's time is three minutes too fast, you can compensate using this hack by making all times account for the three minute shift.

Designed with 2.3.0 RC3 but should in practically any 2.2.x version of vB.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 03-14-2003, 07:29 PM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Screenshot:
Reply With Quote
  #3  
Old 03-14-2003, 08:20 PM
Chris Gwynne's Avatar
Chris Gwynne Chris Gwynne is offline
 
Join Date: Jan 2003
Posts: 316
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You didn't use phpinclude...
Nice hack
Reply With Quote
  #4  
Old 03-14-2003, 09:38 PM
drumsy's Avatar
drumsy drumsy is offline
 
Join Date: Nov 2001
Location: Charlotte, NC
Posts: 292
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I take it that this alleviates the need to contact the server to reset the server clock?
Reply With Quote
  #5  
Old 03-14-2003, 09:49 PM
John's Avatar
John John is offline
 
Join Date: Mar 2002
Location: Norwich, UK
Posts: 1,543
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 11:38 PM drumsy said this in Post #4
I take it that this alleviates the need to contact the server to reset the server clock?

Exactly.

Nice hack - when I had this problem I just coded this in, but it's nice to be able to change it.

:bunny:
Reply With Quote
  #6  
Old 03-14-2003, 10:00 PM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 06:38 PM drumsy said this in Post #4
I take it that this alleviates the need to contact the server to reset the server clock?
Yes although that's the better idea. However on a shared server a offset by a couple of minutes might not bother the sysadmin but might bother the forum admin.
Reply With Quote
  #7  
Old 03-15-2003, 12:04 AM
joeboo's Avatar
joeboo joeboo is offline
 
Join Date: Jun 2002
Posts: 149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Yesterday at 10:20 PM a-drive said this in Post #3
You didn't use phpinclude...
Hahaha, exactly my words, thats the first. Anyways, its rather a nice modification filburt. thanks for sharing.
Reply With Quote
  #8  
Old 03-15-2003, 12:28 AM
Link14716's Avatar
Link14716 Link14716 is offline
 
Join Date: Jun 2002
Location: Georgia, USA
Posts: 2,519
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Are you being transformed into a hacker, filburt? I mean, that's what, 3 hacks in a week or so?

Nice hack, and a very good idea.
Reply With Quote
  #9  
Old 03-15-2003, 09:29 AM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very useful and simple hack. good job turtle!

- miSt
Reply With Quote
  #10  
Old 12-17-2003, 06:02 PM
Red Blaze's Avatar
Red Blaze Red Blaze is offline
 
Join Date: Jan 2003
Location: Texas
Posts: 493
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Rather my functions.php file is so hacked or this hack is for a specific type of Vb version because the coding is slightly different.

In example:

PHP Code:
2. In admin/functions.phpfind:

function 
vbdate($format,$timestamp) {
  global 
$bbuserinfo,$timeoffset;

  return 
date($format,$timestamp+($bbuserinfo['timezoneoffset']-$timeoffset)*3600);


I have the following code:

PHP Code:
function vbdate($format,$timestamp) {
  global 
$bbuserinfo,$timeoffset$dateformat$timeformat;

  if (
$dateformat==$format) {
    
$todaystamp=mktime();
    
$todaydate=date($format,$todaystamp+($bbuserinfo['timezoneoffset']-$timeoffset)*3600);
    
$yestdate=date($format,(($todaystamp-86400)+($bbuserinfo['timezoneoffset']-$timeoffset)*3600));
    
$date date($format,$timestamp+($bbuserinfo['timezoneoffset']-$timeoffset)*3600); 
Alittle help is appreciated. ^^;;
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05639 seconds
  • Memory Usage 2,297KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete