Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Local time and date in post, pm, usernotes and profile v1.5 Details »»
Local time and date in post, pm, usernotes and profile v1.5
Version: 1.00, by Boofo Boofo is offline
Developer Last Online: Jun 2012 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 01-27-2004 Last Update: Never Installs: 25
 
No support by the author.

Local time and date in post, pm, usernotes and profile
Version 1.5
(By Boofo)

This hack will add the local time and date of users in the posts, pms, usernotes and profile. That way you will know what the time and date is where they are located. I use this on my site so I will have an idea if it is the middle of the night, where they are at, or daytime. With your users living in all corners of the globe, this hack is a nice gauge of the different time zones without having to figure out each one in your head.

Thanks goes out to Link14716 for pointing me in the right direction for the pm time and helping to verify the code. And everyone who chipped in at vbulletin.com to help me figure out vB3's new ways of doing things. A special thanks goes out to Chen Avinadav for making the first local time hack for vB2 and allowing me to release it for vB3.

Version Information:
Version 1.0 --Initial release
Version 1.1 --Fixed bug where the User CP DST setting was not being accounted for. Thanks goes out to squall14716 for the fix.
Version 1.2 --Fixed bug where a few people's time was off by an hour or two in the showthread, but right on target everywhere else. Moved the code from the showthread.php into the functions_showthread.php, where it should have been in the first place. Thanks Natch, for all of your hard work in helping me track this down.
Version 1.3 --Fixed bug where local time and date was not showing up in a member's profile when the "Additional Information" box was empty due to them not entering any personal information in their profile. It would only show an N/A.
Version 1.4 --Added ability to have the local time and date to also show up in the showpost.
Version 1.5 --Fixed last known bug where the User CP DST setting was not being automatically accounted for when the DST changed. The Version 1.1 fix seemed to be only temporary and not a total solution. This should take care of it.


Files to edit: 4
functions_showthread.php
private.php
usernote.php
member.php

Templates to edit: 3
postbit
postbit_legacy
memberinfo


If you find this hack useful, please click the install button.

Show Your Support

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

Comments
  #102  
Old 04-03-2004, 05:38 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Gary W
This hack doesn't seem to be working for me, the time shown is 8 hours ahead of the real time (when checking my own post 'Local Time').

Also, shouldn't this hack have support for phrases?

I think this hack belongs in the Beta Hacks forum still, until it gets fixed
This hack goes off of the server time so if your setting in the Admin CP vBulletin Options is not set to the correct server time, it will be off. Please read the thread before makiing assumptions.

https://vborg.vbsupport.ru/showpost....4&postcount=83

If you want phrase support, you are more then welcome to make whatever phrases you need.

This hack is working for me and everyone else that has installed it, so, no, it doesn't belong on beta. I think you're thinking about most of YOUR hacks, Gary.
Reply With Quote
  #103  
Old 04-03-2004, 01:24 PM
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Posts: 2,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Why do you always have to make things so personal? If you want to move my hacks to Beta hacks, then that's fine with me. As you have seen in ALL my previous posts (except my last one in this thread) when I was talking to you, I have tried to steer away from the path of having a personal fight, while you kept on walking right back on that path.

If you want to move my hacks to Beta releases now, since you are now a mod, then I don't mind at all. I release hacks because people request them and want them; if someone wants to do something about it, maybe delete some of my hacks because of some silly reasons that they can come up with, then sure go ahead; they'd also be taking away a hack that at least one person would really love to have on their forums. Yes probably some of my hacks are small, but they do their jobs.

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

Anyhow, back on topic, this hack, I have my server settings set properly in my admin cp, and my timezone is obviously set correctly in my user cp.

I read your last post in this thread and you talked about several improvements that you could make to this hack, so I don't see what you mean by this hack working well, especially not for everyone.

Take a look at these posts:

https://vborg.vbsupport.ru/showpost....6&postcount=98
https://vborg.vbsupport.ru/showpost....1&postcount=87

Anyhow, not too many posts I could get because not many have installed this and/or replied back to this thread.

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

I don't want to play the blame game, if most have seen me, I try not to be rude or point fingers, unlike some people I will not name.

If this post gets deleted, it just goes to show that what has been said in this post really is all true.
Reply With Quote
  #104  
Old 04-03-2004, 01:49 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

As far as moving your hacks, me being a mod has no effect on that. I don't move threads to beta hacks. That is up to the higher staff. I'm just a mod, nothing more. As far as this being personal, you made it that way when you jumped in my thread and said I should move this hack to beta when there is no reason to as the hack DOES work if the person installing it has the setting in the Admin CP set to their ACTUAL server time, not just the time the want the new users to see. This hack is the exact same hack as Chen released for vB2 except that the variable names have changed. Now, if it worked so well for vB2, why should it not work the same way for vB3? The only thing different in vB3 is that they no longer user the server timne to get the time. But this hack DOES.

You set your server time to where the server actually is and the hack will work for you. If not, then don't install it. You didn't hit the install button anyway, so what does it matter?

Now, if you want help getting this hack to work, I will put any contempt I have for you aside and help you get the hack to work. I support my hacks and I get them fixed if someone has problems. You included. It's up to you, but don't tell me my hack doesn't work because you are having problems with it. How many times have you run into the same thing and found out it was an install error or someone didn't follow instructions properly?

And if not to many people have replied to the thread, that must mean it is working for those people, huh?

If you want to carry this further, take it to pm.
Reply With Quote
  #105  
Old 04-07-2004, 10:16 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone having problems with the time being off an hour after the DST change needs to make the following update to this hack.

Thnak goes out to NTLDR for coming up with the correct fix.

functions_showthread.php
usernote.php
member.php

find:

PHP Code:
       $post['tzoffset'] = $post['timezoneoffset'];

       if (
$post['dstonoff'])
        {
        
// DST is on, add an hour
        
$post['tzoffset']++;
       } 
REPLACE it with:

PHP Code:
       $post['tzoffset'] = $post['timezoneoffset'];

if (!
$post['dstonoff']) { 
    
$post['tzoffset']--; 

In private.php find:

PHP Code:
    $pm['tzoffset'] = $pm['timezoneoffset'];
    if (
$pm['dstonoff'])
     {
        
// DST is on, add an hour
        
$pm['tzoffset']++;
    } 
REPLACE it with:

PHP Code:
    $pm['tzoffset'] = $pm['timezoneoffset'];
if (!
$pm['dstonoff']) { 
    
$pm['tzoffset']--; 

Reply With Quote
  #106  
Old 06-24-2004, 10:18 PM
kall's Avatar
kall kall is offline
 
Join Date: Apr 2004
Location: New Zealand
Posts: 2,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

*waits ever-so-patiently for 'goes of setting time, not server time version*

Being that my host is located halfway round the world from me, and with me running a site kinda pointed at locals, things get a little confusicating for people.
Reply With Quote
  #107  
Old 06-25-2004, 02:47 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kall
*waits ever-so-patiently for 'goes of setting time, not server time version*

Being that my host is located halfway round the world from me, and with me running a site kinda pointed at locals, things get a little confusicating for people.
LOL If you figure out how to do the "setting time", let me know. I'd be interested in that myself.

As long as you have the setting in the Admin CP set to the actual server time, your user's local time will show fine. It does for me and almost everyone else who installed this.
Reply With Quote
  #108  
Old 06-25-2004, 11:17 AM
kall's Avatar
kall kall is offline
 
Join Date: Apr 2004
Location: New Zealand
Posts: 2,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Boofo
LOL If you figure out how to do the "setting time", let me know. I'd be interested in that myself.

As long as you have the setting in the Admin CP set to the actual server time, your user's local time will show fine. It does for me and almost everyone else who installed this.
Oh, yes, indeed it does.

However, when a NZer comes on as a guest at 12PM and the board says last posts were made at 3AM yesterday, that's what is confusing.

If they're logged in, all is good and works like it should do.
Reply With Quote
  #109  
Old 06-25-2004, 12:12 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kall
Oh, yes, indeed it does.

However, when a NZer comes on as a guest at 12PM and the board says last posts were made at 3AM yesterday, that's what is confusing.

If they're logged in, all is good and works like it should do.
What is your server time set at? -9?
Reply With Quote
  #110  
Old 06-27-2004, 08:56 AM
kall's Avatar
kall kall is offline
 
Join Date: Apr 2004
Location: New Zealand
Posts: 2,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Boofo
What is your server time set at? -9?
Umm..it was somewhere around there, I changed back to +12 till you work your magic and figure a way around it.

I was thinking of perhaps just sticking the member's timezone selection into the postbit instead for now...

*edit* The server lives in Orlando, FL, USA. I live in AK,New Zealand.

Reply With Quote
Reply


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 10:36 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.05780 seconds
  • Memory Usage 2,323KB
  • Queries Executed 24 (?)
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
  • (4)bbcode_php
  • (5)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
  • (2)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_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