HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Exporter for Drupal request

estest New
edited May 2012 in Feedback

Need exporter for Drupal 6.*

Or could you give a clue how to hack porter plugin for that?

Best Answers

  • estest New
    edited August 2012 Answer ✓

    @businessdad

    Yes, I solved the problem, but not with the help of Vanilla Porter.

    I manually exported data into main vanilla tables: GDN_Category, GDN_Discussion, GDN_Comment, GDN_Role, GDN_User, GDN_UserRole by means of sql queries. Then I counted CountDiscussions and CountComments in GDN_Category table.

    After that I've got fully functional Vanilla forum with all topics and comments from Drupal forum. Except users avatars - it was not important to keep them in my case.

    This is very dirty and unprofessional path - I'm far from being SQL pro, but that will do for me.

    If you are interested in this way of porting, I can show you sql queries that did the job.

Answers

  • What do you mean? Do you want to export Vanilla fields to Drupal? or the other way around?

    Do you have a clue which drupal fields you want to go in which Vanilla fields? (user-> name of drupal = user->user_name of Vanilla, etc)

    There was an error rendering this rich post.

  • estest New
    edited May 2012

    Hi @UnderDog!

    I want to export my Drupal forum into Vanilla 2. I've tried to compose simple mapping table:

    Table: Discussion

    Vanilla fields  | Drupal source
    ---------------------------------
    DiscussionID    | node.nid
    CategoryID      | forum.tid
    InsertUserID    | node.uid
    UpdateUserID    | node_revisions.uid
    Name            | node_revisions.title
    Body            | node_revisions.body
    CountComments   | node_comment_statistics.comment_count
    DateInserted    | node.created    # int(11) NOT NULL DEFAULT '0'
    DateUpdated     | node.changed # int(11) NOT NULL DEFAULT '0'
    DateLastComment | node_comment_statistics.last_comment_timestamp
    

    Table: User

    UserID          | users.uid
    Name            | users.name
    Email           | users.mail
    DateFirstVisit  | user_stats_ips.first_seen_timestamp
    DateLastActive  | users.access
    DateInserted    | users.created    # int(11) NOT NULL DEFAULT '0'
    InsertIPAddress | user_stats_ips.ip_address
    

    Table: Category

    CategoryID      | term_data.tid
    Name            | term_data.name
    

    Table: Comment

    CommentID       | comments.cid
    DiscussionID    | forum.nid
    InsertUserID    | comments.uid
    UpdateUserID    | comments.uid
    Body            | comments.comment
    DateInserted    | comments.timestamp    # int(11) NOT NULL DEFAULT '0'
    DateUpdated     | comment_edited_data.timestamp    # int(11) NOT NULL DEFAULT '0'
    InsertIPAddress | comments.hostname
    

    Omitted fields are not necessary and can be set to null.

    Also, Drupal keeps date information as PHP timestamp in int(11) NOT NULL DEFAULT '0' fields, so we have to convert this to SQL datetime before storing.

  • Big Brother @x00 is watching me :))

    Thanks for the link!

  • Has this been solved yet? Just curious, as I might need it as well. Thanks.

  • estest New
    edited August 2012 Answer ✓

    @businessdad

    Yes, I solved the problem, but not with the help of Vanilla Porter.

    I manually exported data into main vanilla tables: GDN_Category, GDN_Discussion, GDN_Comment, GDN_Role, GDN_User, GDN_UserRole by means of sql queries. Then I counted CountDiscussions and CountComments in GDN_Category table.

    After that I've got fully functional Vanilla forum with all topics and comments from Drupal forum. Except users avatars - it was not important to keep them in my case.

    This is very dirty and unprofessional path - I'm far from being SQL pro, but that will do for me.

    If you are interested in this way of porting, I can show you sql queries that did the job.

  • est said:
    I manually exported data into main vanilla tables: GDN_Category, GDN_Discussion, GDN_Comment, GDN_Role, GDN_User, GDN_UserRole by means of sql queries. Then I counted CountDiscussions and CountComments in GDN_Category table.

    If you are interested in this way of porting, I can show you sql queries that did the job.

    Awesome, that path you took is the exact way to go when there's not a Porter (or Porter Plus) option available :-)

    Besides making a Porter (Plus) option, the manual conversion is an option when you need it done.

    Your example can be taken as a basis for other conversion too :-)

    There was an error rendering this rich post.

  • estest New
    edited August 2012

    I would be happy to use Porter to avoid extra work, but it has no such option as porting from Drupal. I would have trouble hacking Porter plugin - I'm not a php guy, I'm from python camp. But python world has no such thing as Vanilla :)

    BTW, what is Porter Plus? I cannot find it neither in addons nor in google.

  • UnderDogUnderDog MVP
    edited August 2012

    Porter plus is an 'extended' version of the Porter Plugin : https://dl.dropbox.com/u/15933183/porterplus/porterplus.php. It has some extra options when importing, especially from phpBB

    I have to explain though that both plugins do not decide whether you can import from Drupal, Joomla, phpBB, vBulletin, or any other forum system.
    It's the functionality inside Vanilla that does that.
    Having the steps (field mapping) to go from any other system (and an example database!) to Vanilla will help a lot though :-).

    I've been thinking about creating example databases for the most common systems that aren't present in the Porter Plugin at the moment, but I don't see enough conversion requests for that :-S

    There was an error rendering this rich post.

Sign In or Register to comment.