![]() |
Post New Thread from Separate PHP Script
I would like to write a php script to post a weekly summary of data from a non-vBulletin based part of my site. I will run this script automatically every week using a cron-job. The data should be posted as a new thread in a News & Annoncement forum that we run as a sub-forum in vBulletin. The author of the new thread should be a "News Editor" user who is used by us moderators to post news.
Are there any examples to see how others have done something similar in PHP? |
This can be done (and should be done) using the vBulletin Data Managers. Some documentation can be found in the vBulletin Manual, as well as in the articles section.
|
The newthread dms can be a bit overwhelming at first, so I would suggest looking up function build_new_post() in the api. It basically handles all the calls to whatever datamanager you need (most likely threadfirstpost since ypu're creating a new thread). Simply declare thread as first param, then pass it the $newpost array , foruminfo array and should work. Search for it's usage in newthread.php for example to go by.
|
Yes, the function build_new_post() is probably a good starting point. I forgot about that. :)
|
All times are GMT. The time now is 04:17 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:
|