feras
10-10-2009, 06:13 PM
Hi
I am using the ThreadPost Datamanager. The DM makes a new post in the forums when users submit some text in a form (outside of the forums page). The post goes in just fine, however, the user's post count does not increment. Also, I have a script that deletes some posts, but that does not decrement the user's post count.
Code used to add a post:
$postdm =& datamanager_init('Post', $vbulletin, ERRTYPE_ARRAY, 'threadpost');
$postdm->set('threadid', $threadid);
$postdm->set('userid', $userid);
$postdm->set('pagetext', $comment);
$postdm->set('allowsmilie', 1);
$postdm->set('visible', 1);
$postdm->set('dateline', $time);
$postid = $postdm->save();
My question: Is there a way to use datamanger or other code to exactly mimic Admin and Mod actions in the forums interface? For instance, when I delete a user's post as an Admin from the forums interface, the post is deleted and the user's post count decreses (and maybe other things happen that I am not aware of). Is there code out there that mimics this exact functionality for any Admin or Mod action?
Thanks
--------------- Added 1255275014 at 1255275014 ---------------
Does anyone have any insight on this??
I am using the ThreadPost Datamanager. The DM makes a new post in the forums when users submit some text in a form (outside of the forums page). The post goes in just fine, however, the user's post count does not increment. Also, I have a script that deletes some posts, but that does not decrement the user's post count.
Code used to add a post:
$postdm =& datamanager_init('Post', $vbulletin, ERRTYPE_ARRAY, 'threadpost');
$postdm->set('threadid', $threadid);
$postdm->set('userid', $userid);
$postdm->set('pagetext', $comment);
$postdm->set('allowsmilie', 1);
$postdm->set('visible', 1);
$postdm->set('dateline', $time);
$postid = $postdm->save();
My question: Is there a way to use datamanger or other code to exactly mimic Admin and Mod actions in the forums interface? For instance, when I delete a user's post as an Admin from the forums interface, the post is deleted and the user's post count decreses (and maybe other things happen that I am not aware of). Is there code out there that mimics this exact functionality for any Admin or Mod action?
Thanks
--------------- Added 1255275014 at 1255275014 ---------------
Does anyone have any insight on this??