vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Local time and date in post, pm, usernotes and profile v1.5 (https://vborg.vbsupport.ru/showthread.php?t=60863)

Boofo 01-29-2004 01:02 AM

Quote:

Originally Posted by Natch
You - sir - are a gentleman and a scholar :)

That's done the trick :D :D

Ok, if you make those same changes in the other code, it should work like that everywhere the code is. I will update the install file as soon as I hear back from Zelda-King to make sure it fixed it for him also. Thank you everyone for your patience and understanding. I had not run into this problem on my site yet. Glad we found it now. ;)

BTW: The true credit for this fix goes to squall14716. Without his help, I would still be tearing what little hair I have left out. ;)

Natch 01-29-2004 01:15 AM

But with those edit's it's all good :) Great work!

('cept private.php - that's now 1 hr over ...)

Boofo 01-29-2004 01:40 AM

Quote:

Originally Posted by Natch
But with those edit's it's all good :) Great work!

('cept private.php - that's now 1 hr over ...)

In the private.php, you need to replace the code with:

PHP Code:

// Local Date and Time in PM
    
$pm['tzoffset'] = $pm['timezoneoffset'];
    if (
$pm['dstonoff'])
     {
        
// DST is on, add an hour
        
$pm['tzoffset']++;
    }
$pm['localtime'] = date($vboptions['timeformat'], TIMENOW+($pm['tzoffset']-$vboptions['timeoffset'])*3600);
$pm['localdate'] = date($vboptions['dateformat'], TIMENOW+($pm['tzoffset']-$vboptions['timeoffset'])*3600);
// Local Date and Time in PM 

* First post has been updated with all the new code. *

Natch 01-29-2004 01:44 AM

Please excuse my n00bish-ness ...

Thanks for the update :)

Great job - all cool now :)

Boofo 01-29-2004 02:13 AM

Great! And don't worry about being a newbie. We have all been there and some of us still go there from time to time. ;)

Glad it's working for you, now. ;)

EvilLS1 01-29-2004 02:20 AM

Nice one Boofo! :)

Boofo 01-29-2004 02:31 AM

Thank you, my friend. ;)

Natch 01-29-2004 03:32 AM

Quote:

Originally Posted by Boofo
Great! And don't worry about being a newbie. We have all been there and some of us still go there from time to time. ;)

Glad it's working for you, now. ;)

Boofo: sorry to pop back up again, but in Hybrid and Threaded modes, for some reason the template edit is there, but the values of $post[localdate] and $post[localtime] are empty ...

Boofo 01-29-2004 03:50 AM

Quote:

Originally Posted by Natch
Boofo: sorry to pop back up again, but in Hybrid and Threaded modes, for some reason the template edit is there, but the values of $post[localdate] and $post[localtime] are empty ...

You got me there. I don't use anything but linear mode. I would say do a condition checking for those modes and only allow it in linear. Otherwise, I will take a look at it and see if I can figure something out for it. ;)

Boofo 01-29-2004 05:17 AM

Natch, I think I may have your solution. In the showthread.php:

Find:

PHP Code:

  $post $postarray["$id"]; 

AFTER it add:

PHP Code:

// Local Date and Time in Post
    
$post['tzoffset'] = $post['timezoneoffset'];
    if (
$post['dstonoff'])
     {
        
// DST is on, add an hour
        
$post['tzoffset']++;
    }
  
$post['localtime'] = date($vboptions['timeformat'], TIMENOW+($post['tzoffset']-$vboptions['timeoffset'])*3600);
  
$post['localdate'] = date($vboptions['dateformat'], TIMENOW+($post['tzoffset']-$vboptions['timeoffset'])*3600);
// Local Date and Time in Post 

and let me know if that fixes it for both of them.


All times are GMT. The time now is 08:27 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.01267 seconds
  • Memory Usage 1,752KB
  • 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
  • (4)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
  • (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