vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Get threadid once thread is created? (https://vborg.vbsupport.ru/showthread.php?t=245608)

encryption 06-30-2010 09:32 PM

Get threadid once thread is created?
 
I'm still a modder noob and am having a hard time figuring this out... I have added a new field to my newthread template, and what I want to do is update a custom table with once the thread has been created with the new threa'ds threadid and the value from that custom field.

I think I've narrowed the hook down to the newthread_post_complete hook, and I'm a pretty decent php programmer and can handle the SQL update once I get the value, but I just don't know enough about vbulletin to grab that new thread id once it is added. Can someone help me here?

I have looked at the article How to: Add additional fields but it seems add your field to the main thread table via the internal query update... it says nothing about grabbing data for your own table. :confused:

I hope this makes sense, and thanks!

encryption 07-05-2010 11:46 PM

Anybody? :erm:

COL NIL SATIS 07-06-2010 12:52 PM

<a href="https://vborg.vbsupport.ru/showthread.php?t=245608" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=245608</a>

its the number in the url m8

so this thread id is 245608

encryption 07-06-2010 07:23 PM

I understand that part... but how can I grab that number with some custom php code in a plugin at the newthread_post_complete hook?

Thanks!

Adrian Schneider 07-06-2010 07:25 PM

$newpost['threadid']
$threadinfo['threadid']

encryption 07-08-2010 01:43 AM

$newpost worked. Thank you!


All times are GMT. The time now is 02:30 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.01015 seconds
  • Memory Usage 1,713KB
  • 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
  • (6)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