vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   How do I find the new thread ID? (https://vborg.vbsupport.ru/showthread.php?t=219790)

Brother Malachi 07-30-2009 05:55 AM

How do I find the new thread ID?
 
After posting a thread how can I find the new threadid?

$vbulletin->db->query_write("UPDATE thread SET cp = '$_POST[form_cp]', atl = '$_POST[atl]' WHERE threadid=$threadid");

That is in newthread_post_complete.
Basically I added an extra checkbox to newthread template and wanna add it into the db as well.

ragtek 07-30-2009 06:06 AM

Use the datamanager!

https://vborg.vbsupport.ru/showthrea...ghlight=thread

Marco van Herwaarden 07-30-2009 09:20 AM

Like ragtek mentioned: use the data managers.

Your query is insecure and opens your board for SQL-injections.

jaderollie 10-20-2009 04:04 PM

i thought it was in the url, ie :-
https://vborg.vbsupport.ru/showthread.php?t=219790

219790 is forum id number, though the number can be also in the middle of the url like :-
http://website.com/evidence-prophecy...led-today.html

so 5 is the forum id here
hope this helps


All times are GMT. The time now is 08:24 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.01087 seconds
  • Memory Usage 1,711KB
  • 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
  • (4)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