Go Back   vb.org Archive > News and Announcements > vBulletin Pre-Sales Questions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 02-13-2009, 11:36 PM
EddyM EddyM is offline
 
Join Date: Feb 2009
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default API documentation for adding posts (post data manager?)

Hi,

I am the web developer for a site that currently has a forum-like section as part of it, which was built from scratch by me a few years ago. We would now like to change over to a proper forum, which will hopefully be integrated with the site in several other ways too.

At the moment I am trying to decide between phpBB3 and vBulletin. I've played around with a demo of vBulletin, and a copy of phpBB3 on our server, and haven't found much to favour one over the other in terms of how we will want the admin options etc set up (things like allowing guest posts but with a CAPTCHA on the posting page). But it's obviously a lot harder to tell which one will be easier to integrate with the rest of the site in the ways that we want to.

The very first step will be to somehow import all the posts from the existing forum-like system into the new one, so as phpBB is free, I decided to go ahead and have a go at writing some code to add all the posts from the old system to it. But I immediately ran into problems with that, as I can't find any documentation or other help on adding posts which is detailed enough.

So I decided to give up on that for now and have a look at the documentation for vBulletin. There seems to be a lot of it, and there is a section that talks about using Data Managers to do several things, including what I want to do here (adding posts), but then it only gives an example for how to register a new user, and no other information on how to add posts at all... only the fact that there is a data manager for posts.

So what I would like to know is... is there some more extensive documentation on this available somewhere that I will have access to if I buy a vBulletin licence? The documentation page on the main vBulletin site seems to imply that what I have already looked at is the full documentation for vBulletin.

In the absence of full documentation for this, I have some specific questions that it would be very helpful if someone could answer

1. Is it possible to add a post (using the API) as a guest, but with a username? (i.e. the same as someone posting without logging in first, but typing a name in the box when they post, which then gets displayed with it).

2. Is it possible to set the date on this post to a specific timestamp (the time of the original post on the old system), rather than the time when it is actually added to the new forum?

3. This isn't absolutely necessary, but can a script using the API, if so desired, work completely independently of the user that is currently logged in on the computer that is calling the page? I'm just wondering because I had a lot of hassle with this when attempting this with phpBB, if I was logged in it would post the posts as the user currently logged in on my pc (which was the main admin account), rather than as a guest as I wanted... and if I logged out first, it would then be posted correctly as a guest, but therefore have to be approved (there was also no way to override this in the API call, only by changing the permissions for unregistered users on the forum, or rewriting the actual phpBB code), so then I would have to log back in to see what it had actually posted, and log back out after modifying the code before running it again, etc... which was the point where I gave up.

5. Is it possible to add an extra field to the post database to store the email address of the poster (from the old forum system), or would this break anything? The reason I would like to keep these stored with the posts (as well as not wanting to lose any of the existing information anyway) is because I am hoping I might also be able to write some code to run when someone registers, to associate any existing posts matching their email address with their account (the old forum system didn't allow people to register, but it did ask for their email address when posting).

6. Should I use the ImpEx system for all this anyway, as it will only be a one time import once it is all sorted out? I can't answer this myself as I can't find any detailed enough documentation for the ImpEx system either, it only talks about how to use existing importers for other forums, nothing about creating a new importer at all. So I don't know if it is capable at all of doing what I need it to.

If I can get answers to these questions, and therefore know that it is going to be possible to do what we need to with vBulletin, then we can go ahead and buy it.

Thanks very much in advance for any assistance anyone is able to offer

Edit: OK, I now have another question... when I tried to submit this post, it went to the login screen, saying I wasn't logged in and therefore didn't have permission to post. So I logged in there again, and then it went to a page saying "This forum requires that you wait 30 seconds between posts. Please try again in 30 seconds". And it seems it has already been posted anyway.
Does anyone know why that happened, is it something specific to how this forum is set up (perhaps a particularly short login timeout or something?), or is it just a random bug that could occur on my forum too if I go ahead with purchasing and setting up vBulletin?
Reply With Quote
  #2  
Old 02-14-2009, 04:54 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you are going to just be doing a one-time import from the old system, you can create your own Import Modules for ImpEx (the vBulletin Import system).

1-5. Yes. (no 4? )
6. As mentioned in my first line, you should just create an import module (I have not seen any documentation for it, but I know it can be done).
Reply With Quote
  #3  
Old 02-14-2009, 10:46 AM
EddyM EddyM is offline
 
Join Date: Feb 2009
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ooops... not quite sure what happened to 4

Thanks very much for your reply, very good to know that those are all yes

I would still like to know if there is some more documentation (or even just some examples) somewhere though, either for creating import modules or for using the post data manager, as it seems like it's going to be rather hard without anything more than I've found already (which is absolutely nothing for creating import modules) :/
Reply With Quote
  #4  
Old 02-14-2009, 11:45 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Have you seen the documentation in the vBulletin Manual about Data Managers?
Reply With Quote
  #5  
Old 02-14-2009, 12:00 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

And our Articles section?
Reply With Quote
  #6  
Old 02-14-2009, 01:29 PM
EddyM EddyM is offline
 
Join Date: Feb 2009
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yep, I've seen this one: http://www.vbulletin.com/docs/html/main/data_managers
It doesn't really give any details about the post data manager though.

I also found this: http://members.vbulletin.com/api/vBu...hreadPost.html
But couldn't make any sense of anything there in terms of what method(s) to use to actually add a post, and what the arguments to those method(s) are.

I hadn't seen the articles section before though, although I did try several searches on the whole of the vbulletin.org forums, and didn't really come up with anything. I'll have a proper look through that section

Edit: Just had a look through there and found nothing for ImpEx at all, but one article about how to create new posts using a data manager. Although I can't actually see the code because I haven't got a licence yet, and based on the comments on it, I'm not sure if it's actually going to be that useful. But I'm tempted to just go ahead and buy a licence anyway, and hope that there might be some code or comments somewhere within the vBulletin package that I can use as a base to figure out how to do it
Reply With Quote
  #7  
Old 02-14-2009, 04:39 PM
King Kovifor's Avatar
King Kovifor King Kovifor is offline
 
Join Date: Nov 2004
Location: PA
Posts: 3,872
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

After buying a license, there's many people at this forum who will be able to properly help you with the datamanager classes.
Reply With Quote
  #8  
Old 02-15-2009, 02:35 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by EddyM View Post
Yep, I've seen this one: http://www.vbulletin.com/docs/html/main/data_managers
It doesn't really give any details about the post data manager though.
And that's the beauty of data managers, the interface is consistent between all of them. There doesn't really need to be documentation on each of them.
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 08:06 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03796 seconds
  • Memory Usage 2,250KB
  • Queries Executed 13 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)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_postinfo_query
  • fetch_postinfo
  • 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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete