Jump to content

Questions about conversions


Milad IPBPlug.in

Recommended Posts

Hello

In the next few weeks, I'm going to convert two boards from vBulletin 3.8 to IPB 3.1, I wrote hacks for both boards, and there are a good amount of data in the old forums that we can't just dumb and leave without them, so we need to convert them to new similar apps we're currently creating for IPB. Oh, the documentation for developers was and still a good help for me to understand IPB and to integrate my apps to the various joints of it.

What I need now, is a documentation on how-to extend the converter to import more data from the old database to the new one, will it be real? please?

I have another question, I spent few minutes reading the converter script, and I came across a function called: addLink(..) it assigns the old foreign IDs to the new IPB ones, my question is will those IDs be deleted after the conversion?

Regards

Link to comment
Share on other sites

To extend the converter, you would need to:

To add extra information when importing existing data (posts, topics, etc).

In /admin/applications_addon/ips/convert/modules_admin/board/vbulletin_legacy.php simply find the method for the step you want to modify ("convert_topics" for topics, for example) and modify the data being sent.
All these methods will call a library function which is located in admin/applications_addon/ips/convert/sources/lib_board.php which you may need to modify as well.

To add new parts to the converter for currently unconverted tables

1. In /admin/applications_addon/ips/convert/modules_admin/board/vbulletin_legacy.php in the doExecute method, look for:

$this->actions = array( 'custom_bbcode' => array(), 'emoticons' => array(), 'pfields' => array(), 'forum_perms' => array(), 'groups' => array('forum_perms'), 'members' => array('groups', 'custom_bbcode', 'pfields'), 'profile_comments' => array('members'), 'profile_friends' => array('members'), 'ignored_users' => array('members'), 'forums' => array(), 'moderators' => array('groups', 'members', 'forums'), 'topics' => array('forums'), 'topic_ratings' => array('topics', 'members'), 'posts' => array('topics', 'custom_bbcode', 'emoticons'), 'reputation_index' => array('members', 'posts'), 'polls' => array('topics', 'members', 'forums'), 'announcements' => array('forums', 'members', 'custom_bbcode', 'emoticons'), 'pms' => array('members', 'custom_bbcode'), 'ranks' => array(), 'attachments_type' => array(), 'attachments'=> array('attachments_type', 'posts'), 'warn_logs' => array('members'), );














Add an element to this array, the key should be something to identify what you're doing, value can be an empty array.

2. Add a method to the same file labelled "convert_{key}" (where "{key}" is the key of the element you added to the array).
Add whatever code is necessary to import data. Look at the other methods for examples.




The lib_master::addLink method is used to remember what the vBulletin IDs were and what the ID stored in IP.Board for that is. It is used in conjunction with lib_master::getLink.
The links remain in the database after the conversion, but you can delete them if you want - just truncate the conv_links table.

Link to comment
Share on other sites


One off-topic thing:



http://www.twitter.com/Dr_Milad is not good, the bbcode should be http://twitter.com/Dr_Milad




Agreed, but that is a very simple and easy edit/fix.
ACP > Look & Feel > BBCode Management > Twitter > Then look for the field that says "Custom BBCode Replacement" and take out the www.
Link to comment
Share on other sites

  • 3 weeks later...

Thank Mark

I added two actions

			$this->actions = array(

				'ni_categories' => array(),

				'ni_images' => array('ni_categories'),

				'custom_bbcode' => array(),

				'emoticons'		=> array(),

				'pfields'	=> array(),

				'forum_perms' => array(),

				'groups'	=> array('forum_perms'),

				'members'	=> array('groups', 'custom_bbcode', 'pfields'),

				'profile_comments' => array('members'),

				'profile_friends' => array('members'),

				'ignored_users'	=> array('members'),

				'forums'	=> array(),

				'moderators'	=> array('groups', 'members', 'forums'),

				'topics'	=> array('forums'),

				'topic_ratings' => array('topics', 'members'),

				'posts'		=> array('topics', 'custom_bbcode', 'emoticons'),

				'reputation_index' => array('members', 'posts'),

				'polls'		=> array('topics', 'members', 'forums'),

				'announcements'	=> array('forums', 'members', 'custom_bbcode', 'emoticons'),

				'pms'		=> array('members', 'custom_bbcode'),

				'ranks'			=> array(),

				'attachments_type' => array(),

				'attachments'=> array('attachments_type', 'posts'),

				'warn_logs'		=> array('members'),

				);

and created two functions as a test


public function convert_ni_categories (){}

public function convert_ni_images (){}




but received the error:
"here is a problem with the converter: called invalid action ni_categories"

How can I make my actions valid?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...