The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Script to create new thread followed by a new post
So I have a page where a new thread is created via the following script.
Code:
// ################# start new thread ############################### // Create a new datamanager for posting $threaddm =& datamanager_init('Thread_FirstPost', $vbulletin, ERRTYPE_ARRAY, 'threadpost'); // Set some variable and information $forumid = 59; // The user id of the person posting $user = htmlspecialchars_uni( fetch_userinfo($userid) ); $title = $user['username'] . "'s " . $year . " " . $make . " " . $model . " [" . $color . "]"; // The title of the thread $pagetext = addslashes("Testing mic check 1 2"); // The content of the thread $allowsmilie = '1'; // Are we allowing smilies in our post $visible = '1'; // If the post visible (ie, moderated or not) // Parse, retrieve and process the information we need to post $foruminfo = fetch_foruminfo($forumid); $threadinfo = array(); $threaddm->set_info('forum', $foruminfo); $threaddm->set_info('thread', $threadinfo); $threaddm->setr('forumid', $forumid); $threaddm->setr('userid', $userid); $threaddm->setr('pagetext', $pagetext); $threaddm->setr('title', $title); $threaddm->set('allowsmilie', $allowsmilie); $threaddm->set('visible', $visible); // Lets see what happens if we save the page $threaddm->pre_save(); if(count($threaddm->errors) < 1) { // Basically if the page will save without errors then let do it for real this time $threadid = $threaddm->save(); unset($threaddm); } else { // There was errors in the practice run, so lets display them var_dump ($threaddm->errors); } // ################# end new thread############################### I do not need information on how to extract data i just need the syntax to make a new post in an already existing thread. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|