$postdm = new vB_DataManager_Post($vbulletin, ERRTYPE_STANDARD);
$postthreadid = '4473';
$postusername = 'admin';
// Use $postusername if posting as a guest, use $postuserid if posting as a user
//$postuserid = '1';
$postpagetext = 'Hi mom!';
$postdm->set_info('forum', $foruminfo);
$postdm->set_info('thread', $threadinfo);
$postdm->set('threadid', $postthreadid);
$postdm->set('username', $postusername);
// Use $postusername if posting as a guest, use $postuserid if posting as a user
//$postdm->set('userid', $postuserid);
$postdm->set('pagetext', $postpagetext);
$postdm->set('allowsmilie', 1);
$postdm->set('visible', 1);
$postdm->set('dateline', TIMENOW);
$postdm->save();
unset($postdm);
how can i attach file when i want to create a thread with data manager?
i think that i must use class_dm_attachment.php but how?
can anyone help me?
(i am new to vb programming!)
Hi-
Did you figure out how to add a post with attachments? Thanks!
I made a script to insert answers in the test environment I worked perfect (was with vb4.11), but to pass it to the production environment (vb4.2) throws an error on the line where does this:
new vB_DataManager_Post ($vbulletin, ERRTYPE_STANDARD);
If I comment the line, the script continues, so that's the problem, the error is this:
Fatal error: Registry object is not an object in front of it class_dm.php and a large array of data. I do not understand it may be going, or if I change something in the latest version of vBulletin. Please let me help,
thank you very much
Hello, thanks for all these helpful posts. But i have a couple question, i want to know about the Mobile API needed for showing all posts and Mobile API needed for creating new posts. Also if i can get the definition of these API that will be very much helpful for me. Thanks.
You are talking about the Mobile Suite for 3.x and the API that you download from the members area in order to run the Mobile Suite? (This is the 3.x article forum.)
I am doing Integration of my App with vBulletin Mobile API.
Can anyone suggest me what is the API method and what are the parameters needed for Creating Posts ?
I am doing Integration of my App with vBulletin Mobile API.
Can anyone suggest me what is the API method and what are the parameters needed for Creating Posts ?
OOPS - I did it again, this is for VB4, Sorry!
I can give you a few links that helped me out when I was going through the code. You may have already looked at them.
You are talking about the Mobile Suite for 3.x and the API that you download from the members area in order to run the Mobile Suite? (This is the 3.x article forum.)
Thank you for your response.
I am not talking about the Mobile Suite for 3.x and i have not downloaded the API from the members area.
I am trying to integrate with vBulletin 4.2 using the REST Interface.
Thanks
--------------- Added [DATE]1386343340[/DATE] at [TIME]1386343340[/TIME] ---------------
Quote:
Originally Posted by tbworld
OOPS - I did it again, this is for VB4, Sorry!
I can give you a few links that helped me out when I was going through the code. You may have already looked at them.
Thank you for your response.
Yes I have already looked at them. But i couldn't able to figure out which API method is needed for Creating new Posts.
Also the following link doesn't say anything about the Parameters, required for the API method. http://www.vbulletin.com/vbcms/conte...52-Method-List
I have logged in by calling the API method login_login and then registered the client by calling the API method api_init.
Now I have the Sessionhash, Accesstoken, clientid and Secret but i don't know Which API method i should call and what parameters i need to pass.