Ducks
09-16-2007, 12:30 PM
I'm using this to create threads from my own files:
// Backend files
require_once('./global.php');
require_once('./includes/class_dm.php');
require_once('./includes/class_dm_threadpost.php');
// Setup Variables
$forumid = 23; // The forum id that you want the thread posted in
$postuserid = 1328; // The Userid of the poster
$postusername = "Justin"; // The username of the poster
$title = "This just in: " . $username . " joins our Forums..."; // The thread title
// Don't change below this line
// Start thread create
$threaddm = new vB_DataManager_Thread_FirstPost($vbulletin, ERRTYPE_STANDARD);
$username = htmlspecialchars_uni($username);
$allowsmilie = '1';
$visible = '1';
eval('$pagetext .= "' . fetch_template('welcome_thread') . '";');
// Insert thread
$threaddm->do_set('forumid', $forumid);
$threaddm->do_set('postuserid', $postuserid);
$threaddm->do_set('userid', $postuserid);
$threaddm->do_set('username', $postusername);
$threaddm->do_set('pagetext', $pagetext);
$threaddm->do_set('title', $title);
$threaddm->do_set('allowsmilie', $allowsmilie);
$threaddm->do_set('visible', $visible);
$tid = $threaddm->save();
// Update last post stuff on forumdisplay
require_once('./includes/functions_databuild.php');
build_forum_counters($forumid);
But I've trouble adding an 'icon id', I've tried to add
$threaddm->do_set('iconid', '10');
And
$threaddm->do_set('iconid', 10);
But none of them work. Any ideas?
// Backend files
require_once('./global.php');
require_once('./includes/class_dm.php');
require_once('./includes/class_dm_threadpost.php');
// Setup Variables
$forumid = 23; // The forum id that you want the thread posted in
$postuserid = 1328; // The Userid of the poster
$postusername = "Justin"; // The username of the poster
$title = "This just in: " . $username . " joins our Forums..."; // The thread title
// Don't change below this line
// Start thread create
$threaddm = new vB_DataManager_Thread_FirstPost($vbulletin, ERRTYPE_STANDARD);
$username = htmlspecialchars_uni($username);
$allowsmilie = '1';
$visible = '1';
eval('$pagetext .= "' . fetch_template('welcome_thread') . '";');
// Insert thread
$threaddm->do_set('forumid', $forumid);
$threaddm->do_set('postuserid', $postuserid);
$threaddm->do_set('userid', $postuserid);
$threaddm->do_set('username', $postusername);
$threaddm->do_set('pagetext', $pagetext);
$threaddm->do_set('title', $title);
$threaddm->do_set('allowsmilie', $allowsmilie);
$threaddm->do_set('visible', $visible);
$tid = $threaddm->save();
// Update last post stuff on forumdisplay
require_once('./includes/functions_databuild.php');
build_forum_counters($forumid);
But I've trouble adding an 'icon id', I've tried to add
$threaddm->do_set('iconid', '10');
And
$threaddm->do_set('iconid', 10);
But none of them work. Any ideas?