Bulk loading threads with thread fields
Anil Gidwani Offline
Junior Member
**
Posts: 3
Joined: Jul 2013
Post: #1
Bulk loading threads with thread fields
I'm working on a plugin for bulk loading data into a forum that allows XThreads.

So far, I've got the package to read a CSV file and upload the threads into the forum with the thread subject and body. This was done by the following code, which invokes the posthandler for ordinary threads, $posthandler->validate_thread:

$new_thread = array(
"fid" => 21,
"subject" => $finalSubject,
"icon" => ' ',
"uid" => '1',
"username" => $mybb->user['username'], /* Screened for Super Admin */
"message" => $finalBody,
"ipaddress" => '127.0.0.1',
"posthash" => ''
);

$posthandler->set_data($new_thread);
$valid_thread = $posthandler->validate_thread();

My question is:  Is there a corresponding posthandler->validate_thread for XThreads?   I was unable to find one.

How do I modify the above code so that an XThread with thread field data is created instead of an ordinary thread?
Should "xthreads_input_posthandler_insert" be called instead?
(This post was last modified: 07-24-2013 06:33 PM by Anil Gidwani.)
07-24-2013 04:17 PM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
Bulk loading threads with thread fields - Anil Gidwani - 07-24-2013 04:17 PM

 Standard Tools
Forum Jump: