The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
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? |
#2
|
||||
|
||||
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.
|
#3
|
||||
|
||||
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.
|
#4
|
||||
|
||||
Yes, the function build_new_post() is probably a good starting point. I forgot about that.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|