The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Create New Thread with Non-vB Script
I'd like to be able to create a new thread in a specific forum using a non-vB script (though I'd be logged in). What would I need as the necessary code to insert a new post/thread into the database using vB's built-in functions?
Thanks. |
#3
|
|||
|
|||
Okay, thanks. I think I'm 90% there. The following code works when it's on its own page, but when I include it in the rest of my script I get the following error:
Quote:
PHP Code:
|
#4
|
||||
|
||||
You need to include vBulletin's global.php for the code to work. Also, you should use datamanager_init() to instantiate DMs.
|
#5
|
|||
|
|||
global.php is included earlier in the script. Interestingly, on my test page without global.php, it worked.
This time I added the following: PHP Code:
Quote:
--------------- Added [DATE]1236372364[/DATE] at [TIME]1236372364[/TIME] --------------- Okay, I had a little progress by changing $classtype to ThreadPost. Now I'm getting the following. Quote:
|
#6
|
||||
|
||||
PHP Code:
|
#7
|
|||
|
|||
*Sigh*
Quote:
PHP Code:
|
#8
|
||||
|
||||
And $vbulletin exists in its form generated by global.php?
|
#9
|
|||
|
|||
Yes, the following is at the top of the script.
PHP Code:
PHP Code:
|
#10
|
||||
|
||||
Paste the output of this (add it above your data manager call):
PHP Code:
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|