vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Date & Time Stamp (https://vborg.vbsupport.ru/showthread.php?t=73821)

Intex 01-05-2005 12:13 PM

Date & Time Stamp
 
I'm using a hack that I need to modify to include a date / time stamp in the PHP code. It's essentially a chat facility, but unforunately it doesn't show the date / time when the user sends the message.

I've found the right place to put the code in the original php file, but I'm just not sure of the correct syntax.

If anybody could shed some light on it, that would be great :).

Xenon 01-05-2005 01:23 PM

timestamps in vb are the default unixtimestamp,

you can use the TIMENOW constant for it, or if you need a special time/date take a look at mktime() function of php

Intex 01-06-2005 09:33 AM

Thanks Xenon.

So would it be possible to use that as a BBCode, so it could be called any time?

rake 01-06-2005 11:20 AM

I don't really know what you mean there, but timestamps which are basically, the number of seconds elapsed from the start of the unix era, can be formatted using the date function. Look that up on php.net

Intex 01-06-2005 03:29 PM

OK, perhaps I'm not explaining it properly. Say, for example, someone creates a post as normal. In the text of that post they can put a BBcode or something that will trigger the display of the date and / or time at that particular position.


All times are GMT. The time now is 07:02 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.01109 seconds
  • Memory Usage 1,708KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete