vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Help with redirect and localdate (https://vborg.vbsupport.ru/showthread.php?t=46332)

Xenon 12-05-2002 02:32 PM

oh, congratulations, if i understand that right :)

hmm, you have to use the vbdate function and then just use the normal datefunction syntax for it, it'll automatically checks the timezone of a user and so on..

Boofo 12-05-2002 02:42 PM

Quote:

Originally posted by Xenon
oh, congratulations, if i understand that right :)


You understood ir tight. Twins boys. :) And thank you for the congratulations.

Quote:

hmm, you have to use the vbdate function and then just use the normal datefunction syntax for it, it'll automatically checks the timezone of a user and so on..
Like this?

Code:

$post['localtime'] = date($timeformat, time()+($post['timezoneoffset']-$timeoffset)*3600);
$post['localdate'] = date($dateformat, time()+($post['timezoneoffset']-$timeoffset)*3600);
$post['localday'] = day($dayformat, time()+($post['timezoneoffset']-$timeoffset)*3600);

How would I do this for the forumhome? In the index.php, I know, but I'm not sure wqhere to put it exactly. (I've been away from php for too long, it seems. :))

Xenon 12-05-2002 07:26 PM

things you want to show up in every post belong to functions.php

section getpostbit ;)

Boofo 12-05-2002 07:29 PM

Is the code above correct for getting the day? Putting it there won't work for the forumhome page though, will it?

Xenon 12-05-2002 07:33 PM

$post['localday'] = date("D", time()+($post['timezoneoffset']-$timeoffset)*3600);

would be correct for displaying for Example "Sun"

Boofo 12-05-2002 07:37 PM

Ahhh, ok, I see now. The D is just the php code for how you want the day to show up. That's pretty simple. I should have known that one. See what happens when you are away too long? :) Last question, I figured out that to have it show up on the forumhome, I need to put it in the index.php file. Can you tell me where it would need to go in there, please? Or is there a way to include it in the timezone variable?

Xenon 12-05-2002 07:48 PM

as you don't need it anywhere else, jsut put it before this line:
PHP Code:

eval("dooutput(\"".gettemplate('forumhome')."\");"); 


Boofo 12-05-2002 08:39 PM

I'd like to be bale to do it globally for all of the timezone variables on all of the pages. Can it be done that way?

Xenon 12-06-2002 11:41 AM

you can just change the standart date/time format in vb-options for that...

Boofo 12-06-2002 02:20 PM

Sorry about this. :) I'm not explaining myself very well. I don't want all of the date and times like that, only for the forumhome timezones that are also at the bottom of each page. The Forums and Threads listings would be too long with all of that.


All times are GMT. The time now is 05:46 PM.

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.01185 seconds
  • Memory Usage 1,734KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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