vb.org Archive

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

FreshFroot 01-10-2011 02:58 AM

dateline
 
Hi there.

I am trying to grab the dateline when someone closes a thread. I am using the showthreadopenclose hook.

Would a variable such as "$post[dateline]" work in this case?

Converting a dateline timestamp is fine. I just don't really know how I would get the timestamp when closing a thread? I was thinking using the $post[dateline] variable, it would get me the timestamp at that moment the thread is closed?

I'm basically trying to store this dateline timestamp into a table in the database.

kh99 01-10-2011 09:36 AM

I the case of closing it from the thread tools menu, I think hook location threadmanage_openclose would work and it looks like you can check for $threadinfo['open'] == 0 (because the same code opens and closes, and the hook's called after the field is set to 0), and use $threadinfo['dateline'].

If the inline moderation is used, there's hook location inlinemod_closeopen and you can check for $_POST['do'] == 'close'. The dateline's not available so you'd have to query that yourself using $thread['threadid'] (or edit inline.php and add dateline to the list of fields, around line 448).

I haven't tried any of this. Also, I don't know if these are the only two ways to close a thread.


All times are GMT. The time now is 04:14 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.01803 seconds
  • Memory Usage 1,703KB
  • 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
  • (2)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