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)
-   -   More Functions in Edit Post if you are an Admin (https://vborg.vbsupport.ru/showthread.php?t=33761)

Jawelin 01-15-2002 11:33 AM

Quote:

Originally posted by Xenon

the offset you have to set, should be like the one you set in your vb options ;)

Almost...
Actually I have GMT -5 for Server' time (EST) and GMT +1 for mine and almost users (CET)... :)
So I should make the sum of abs...

By now a fixed '6' should work great !
Thanks.

Jawelin 01-18-2002 09:29 PM

Quote:

Originally posted by Xenon
i see to correct it just add the line

$datzeit=$datzeit+4*3600;

right after

$datzeit=mktime(substr($datzeit,11,2), substr($datzeit,14,2), 0, substr($datzeit,3,2), substr($datzeit,0,2), substr($datzeit,6,4));

and change the 4 to your timeoffset.

Just a small correction... I tried myself :)
If my server is in a timezone 'on the left' of mine (as said, I'm on +1, the server is on -5), I should SUBTRACT 6 and not add it... :)

$datzeit is the time string displayed on my page, adjusted to my time... If the server time is six hours 'after' mine, I should resave the edited post with the server time...

my case: ---> $datzeit = $datzeit - 6 * 3600;

Thanks again for your help.
Bye

Shenlong 01-19-2002 12:29 AM

hey good hack

but can someone tell me the time for

Eastern Time (U.S.A.)

PM/AM Clock

What should I replace it with?

Jawelin 01-19-2002 08:06 AM

It' a RELATIVE value: where are you ?
:supwink:

Jawelin 01-19-2002 03:23 PM

Lookin' at vbdate() function source, I found out how to parametrize the admin's offset behind the server:

simply, the users of this hack - with your bugfix - should replace the code

PHP Code:

$datzeit=mktime(substr($datzeit,11,2), substr($datzeit,14,2), 0substr($datzeit,3,2), substr($datzeit,0,2), substr($datzeit,6,4));
$datzeit=$datzeit+4*3600

PHP Code:

$datzeit=mktime(substr($datzeit,11,2), substr($datzeit,14,2), 0substr($datzeit,3,2), substr($datzeit,0,2), substr($datzeit,6,4));
$offset=3600*($bbuserinfo['timezoneoffset']-$timeoffset);   // Seconds offset behind the server/post time
$datzeit=$datzeit-$offset;                                  // Traslated new post time 

That upgrade reverses, just before saving it, the traslation made at reading time from the post(server) time to the user time. Actually it acts as vbdate() with an inverse traslation.

This way there shouldn't be neither the import of global variables $bbuserinfo and $timeoffset, like functions.php has, as at the top of editpost.php there's a full global variables import.

That is !!
Bye
:stoned:

Shenlong 01-19-2002 07:14 PM

Quote:

Originally posted by Jawelin
It' a RELATIVE value: where are you ?
:supwink:

Was that to me? I just want to know what timestamp is:

EST (U.S.A.) because im not good with doing the m-y-d thing, thats all

Jawelin 01-19-2002 10:21 PM

Quote:

Originally posted by Shenlong
hey good hack
but can someone tell me the time for
Eastern Time (U.S.A.)
PM/AM Clock
What should I replace it with?

Excuse, but HOW COULD WE UNDERSTAND something different from such a question ?
:greedy:

Hwr my solution is not for you... aren't absolutely interested in, I guess..

Lucky 01-19-2002 11:12 PM

I'm sure this may come in handy!

Thanx!

Shenlong 01-19-2002 11:14 PM

Quote:

Originally posted by Jawelin


Excuse, but HOW COULD WE UNDERSTAND something different from such a question ?
:greedy:

Hwr my solution is not for you... aren't absolutely interested in, I guess..

dude, lol what are u smoking? i dont understand u.

i just am wondering what to put in for the EST U.S.A. time instead of the german time

Jawelin 01-20-2002 09:28 AM

Quote:

Originally posted by Shenlong


Was that to me? I just want to know what timestamp is:

EST (U.S.A.) because im not good with doing the m-y-d thing, thats all

I was right!!! ;)
Well.
Your server is EST (GMT -5). You are in Germany (GMT +1).
You definetively can use the hack's default $format : d.m.Y .... with all the substrings as the authod did...

Very simple, then... You have to correct the output time with a '-6 hours', just like me.
Any case, you can use along everyone the upgrade in Post#15.

:up: :up:


All times are GMT. The time now is 07:54 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.01271 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
  • (2)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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