Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > vBulletin 3 Articles
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Create Posts
fly
Join Date: Oct 2003
Posts: 1,215

 

Show Printable Version Email this Page Subscription
fly fly is offline 12-06-2005, 10:00 PM

PHP Code:
require_once('./global.php');
require_once(
'./includes/class_dm.php');
require_once(
'./includes/class_dm_threadpost.php');

$postdm = new vB_DataManager_Post($vbulletinERRTYPE_STANDARD);

$postthreadid '4473';
$postusername 'admin';
// Use $postusername if posting as a guest, use $postuserid if posting as a user
//$postuserid = '1';
$postpagetext 'Hi mom!';

$threadinfo fetch_threadinfo($postthreadid);
$foruminfo fetch_foruminfo($threadinfo['forumid']);

$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); 
Reply With Quote
  #92  
Old 08-22-2010, 12:27 PM
ThorstenA's Avatar
ThorstenA ThorstenA is offline
 
Join Date: Nov 2004
Posts: 669
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by CarcaBot View Post
...
That works fine on vbulletin 4.x ! Thanks!
Reply With Quote
  #93  
Old 11-12-2010, 11:15 AM
leitel leitel is offline
 
Join Date: Mar 2003
Location: Costa Rica
Posts: 118
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can I use this approach to add articles to vB CMS?
Reply With Quote
  #94  
Old 04-24-2011, 06:22 PM
av8or1 av8or1 is offline
 
Join Date: Mar 2011
Posts: 58
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ULFSoft View Post
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!
Reply With Quote
  #95  
Old 12-05-2012, 12:42 AM
rey maximo rey maximo is offline
 
Join Date: Apr 2011
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello, sorry for my English, I use translator

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
Reply With Quote
  #96  
Old 12-05-2013, 02:31 PM
bravura bravura is offline
 
Join Date: Dec 2013
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #97  
Old 12-05-2013, 04:55 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.)
Reply With Quote
  #98  
Old 12-06-2013, 01:28 PM
bravura bravura is offline
 
Join Date: Dec 2013
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello,

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 ?
Reply With Quote
  #99  
Old 12-06-2013, 01:52 PM
tbworld tbworld is offline
 
Join Date: Oct 2008
Posts: 2,126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by bravura View Post
Hello,

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.

vBulletin Mobile API code directory:
Code:
/includes/api/6
Early documentation post about the API
http://www.vbulletin.com/vbcms/conte...334-mobile-api

Thread from vBulletin.com about the mobile API
http://www.vbulletin.com/forum/forum...-documentation
Reply With Quote
  #100  
Old 12-06-2013, 01:53 PM
bravura bravura is offline
 
Join Date: Dec 2013
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
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 View Post
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.

vBulletin Mobile API code directory:
Code:
/includes/api/6
Early documentation post about the API
http://www.vbulletin.com/vbcms/conte...334-mobile-api

Thread from vBulletin.com about the mobile API
http://www.vbulletin.com/forum/forum...-documentation
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.


Thanks
Debashis
Reply With Quote
  #101  
Old 12-06-2013, 03:13 PM
ZUCCO ZUCCO is offline
 
Join Date: Feb 2009
Posts: 241
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Using codes . Just click on create new thread
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:37 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05001 seconds
  • Memory Usage 2,329KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (1)bbcode_php
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (1)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete