MyBB Community Forums

Full Version: MyBB Integrator Create Thread issue
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello guys,
I'm trying to create a new thread with a form using MyBB Integrator. Therefor I wrote a script, creating a dummy-thread (so not using a form to activate it, but trying to run it directly), somehow it doesn't do anything and shows a blank page.

File structure:
/class.MyBBIntegrator.php
/create_thread.php
/forum/global.php

create_thread.php
<?php
define('IN_MYBB', NULL);
global $mybb, $lang, $query, $db, $cache, $plugins, $displaygroupfields, $config;
require_once './forum/global.php';
require_once './class.MyBBIntegrator.php';
$MyBBI = new MyBBIntegrator($mybb, $db, $cache, $plugins, $lang, $config); 

$data = array(
    'fid' => 2,
    'subject' => 'Test_Title',
    'uid' => 2,
    'username' => 'Information',
    'ipaddress' => get_ip(),
    'message' => 'test'
);
$create = $MyBBI->createThread($data);
print_r($create); 

?>

Any ideas?