jwocky
01-10-2011, 02:28 PM
I want to build a datamanger that will periodically go and edit a thread title only of a specific thread periodicly.
It would actually edit and change the thread title to the current date/time.
I dont want to modify the text of the post or the starter, or any other settings such as whether the thread is open, closed, etc...
My question is, do I still have to set data the pagetext, etc.. into a datamanager if I dont want to change it, or will vbulletin know to leave that the way it was?
Does anyone have any sample code to pull of what im thinking of here?
Thanks!!
require_once('global.php');
require_once('includes/class_dm.php');
require_once('includes/class_dm_threadpost.php');
require_once('includes/functions_databuild.php');
$postdm = new vB_DataManager_Post($vbulletin, ERRTYPE_STANDARD);
$postthreadid = '882523';
$postuserid = '1';
$threadinfo = fetch_threadinfo($postthreadid);
$foruminfo = fetch_foruminfo($threadinfo['forumid']);
$postdm->set_info('forum', $foruminfo);
$postdm->set_info('thread', $threadinfo);
$postdm->set('threadid', $postthreadid);
$postdm->save();
unset($postdm);
build_forum_counters($threadinfo['forumid']);
I purposely left out the pagetext, smilies, etc... will that instruct vbuletin to leave that data alone?
Thanks!!
It would actually edit and change the thread title to the current date/time.
I dont want to modify the text of the post or the starter, or any other settings such as whether the thread is open, closed, etc...
My question is, do I still have to set data the pagetext, etc.. into a datamanager if I dont want to change it, or will vbulletin know to leave that the way it was?
Does anyone have any sample code to pull of what im thinking of here?
Thanks!!
require_once('global.php');
require_once('includes/class_dm.php');
require_once('includes/class_dm_threadpost.php');
require_once('includes/functions_databuild.php');
$postdm = new vB_DataManager_Post($vbulletin, ERRTYPE_STANDARD);
$postthreadid = '882523';
$postuserid = '1';
$threadinfo = fetch_threadinfo($postthreadid);
$foruminfo = fetch_foruminfo($threadinfo['forumid']);
$postdm->set_info('forum', $foruminfo);
$postdm->set_info('thread', $threadinfo);
$postdm->set('threadid', $postthreadid);
$postdm->save();
unset($postdm);
build_forum_counters($threadinfo['forumid']);
I purposely left out the pagetext, smilies, etc... will that instruct vbuletin to leave that data alone?
Thanks!!