vb.org Archive

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

Jacob B 02-20-2009 03:04 AM

Logging Time
 
I am looking to insert a time log into one of my modifications. For instance; once a user submits a form, the time of that particular submission is recorded and is then displayed inside/with that user's post.

I seem to be having a slight problem getting it to log the time. I'm not actually aware of how vBulletin logs the time. I've looked through the API and can't seem to locate the information I'm after. I'm actually not sure about what PHP I must use to insert it and log it.

If someone could supply the code and elaborate on where the code must go inside the PHP & Product file, it'd be greatly appreciated. I've been able to get the date logged just fine, but logging time seems to be beating me at this game.

Dismounted 02-20-2009 03:23 AM

Use the constant "TIMENOW". This is a constant vBulletin sets which is computed from time() and is a Unix timestamp.

Jacob B 02-20-2009 03:33 AM

Thank you! I knew it was something small, but couldn't get my head around it.


All times are GMT. The time now is 04:59 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.01418 seconds
  • Memory Usage 1,705KB
  • 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
  • (3)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