![]() |
API Question
Hey all. I'm creating a few custom PHP pages using vBulletin and it's API that create new threads, replies and users. Once I create a new item, I will need to output the newly created id. I see for the User object that the save method returns the new user id, but there is nothing for threads and posts. For these I'm using vB_DataManager_Thread_FirstPost and vB_DataManager_Post.
Does anyone know how I can retrieve the newly created thread id and post id's when I save them using the API? Thank you. |
The save() method, when used in inserting a new record, will (nearly) always return the ID of the newly inserted row. The only exception is tables that do not have auto increment values (e.g. customavatar).
|
Great that does work. Thanks. I have another quick question. I'm using
vB_DataManager_Thread_FirstPost to create my thread and first post which works, but it is not incrementing the user's post count. I do run build_forum_counters($forum_id); after the save. Any idea how to get that working? Thanks. |
Does the forum have post counts enabled?
|
Hi. Yes...post counts are enabled in the forum
|
Quote:
|
Quote:
|
All times are GMT. The time now is 10:07 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|