The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
I'm using this to create threads from my own files:
Code:
// 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);
Code:
$threaddm->do_set('iconid', '10');
Code:
$threaddm->do_set('iconid', 10);
|
|
#2
|
||||
|
||||
|
What's the fieldname in the database
?
|
|
#3
|
|||
|
|||
|
iconid, but how does that helps me?
|
|
#4
|
|||
|
|||
|
Use $threaddm->set() instead of $threaddm->do_set() they are the same but I think $threaddm->set() verifies the contents.
Also you probably need to pass the value as a variable if I remember correctly. So it would be: PHP Code:
|
|
#5
|
|||
|
|||
|
That works, thank you
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|