lowspeed
01-16-2005, 11:54 PM
I have a thread lets say # 1091
How do i submit a reply to that thread using build_new_post ?
I tried doing something like this ...
chdir('../vb');
$phrasegroups = array();
// get special data templates from the datastore
$specialtemplates = array();
// pre-cache templates used by all actions
$globaltemplates = array();
// pre-cache templates used by specific actions
$actiontemplates = array();
require_once('global.php');
require_once('includes/functions_newpost.php');
$post = array();
$userid = 1; // i picked this
$forumid = 8; // i picked this
$foruminfo = fetch_foruminfo($forumid);
$bbuserinfo = fetch_userinfo($userid);
//$post[title] = ''; // dont want new title for reply
$post[message] = 'The reply body';
$post[poststarttime] = TIMENOW;
$post[posthash] = md5($post[poststarttime] . $bbuserinfo['userid'] . $bbuserinfo['salt']);
build_new_post('reply', $foruminfo, array(), 1091, $post, $errors); // theard 1091 which i picked
echo ("<br>*********************** ".$post['threadid']);
chdir('../outside');
But it doesn't work :( can someone please help ?
Thanks a bunch !
How do i submit a reply to that thread using build_new_post ?
I tried doing something like this ...
chdir('../vb');
$phrasegroups = array();
// get special data templates from the datastore
$specialtemplates = array();
// pre-cache templates used by all actions
$globaltemplates = array();
// pre-cache templates used by specific actions
$actiontemplates = array();
require_once('global.php');
require_once('includes/functions_newpost.php');
$post = array();
$userid = 1; // i picked this
$forumid = 8; // i picked this
$foruminfo = fetch_foruminfo($forumid);
$bbuserinfo = fetch_userinfo($userid);
//$post[title] = ''; // dont want new title for reply
$post[message] = 'The reply body';
$post[poststarttime] = TIMENOW;
$post[posthash] = md5($post[poststarttime] . $bbuserinfo['userid'] . $bbuserinfo['salt']);
build_new_post('reply', $foruminfo, array(), 1091, $post, $errors); // theard 1091 which i picked
echo ("<br>*********************** ".$post['threadid']);
chdir('../outside');
But it doesn't work :( can someone please help ?
Thanks a bunch !