Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product

Ready to contribute?

Amazing! Sign our contributors' agreement and then join us on GitHub.

Vanilla Porter for Discuss ( Modx )

This discussion is related to the Vanilla Porter addon.

Hi.

I have a forum hosted on Discuss (modx).
https://modx.com
https://modx.com/extras/package/discuss

I know very few people are using it, and I'd like to switch to vanilla.

Currently, exporting the content won't work with Vanilla Porter.

Has anyone any recommendation or suggestion how to do that ?

Thanks

Comments

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    Are there any porter scripts for Discuss? Maybe you can convert your forum to phpbb or whatever and afterwards convert that to Vanilla.

    If not we might be able to help you if you can provide some sample data. But it still would require quite a lot of work (depending on the amount of features Discuss has to offer.

  • Unfortunately there are no script available :(

    Actually discuss is really simple, and I just want to export users, the posts and the thread.

    Database looks like that if it can help.

    `--

    -- modx_discuss_posts

    INSERT INTO modx_discuss_posts (id, board, thread, parent, title, message, author, createdon, editedby, editedon, icon, allow_replies, rank, ip, integrated_id, depth, answer) VALUES
    (1, 4, 1, 0, 'content', 'content!', 1, '2013-05-21 00:35:22', 0, NULL, '', 1, '0000000001', 'IP.249.IP.63', 0, 0, 0),`

    I was wondering if it would be possible to import/export tables directly into a local install of vanilla.
    And then create an export file from that? ( Maybe too far fetched )

  • whu606whu606 I'm not a SuperHero; I just like wearing tights... Moderator

    Before anyone here could help, you would really need to provide a DB dump.

    There doesn't seem to be any dummy data available on the Interwebby.

    If you don't want to do that, set up Vanilla, then use phpMyAdmin (or a similar tool) to compare the databases.

    I don't know if it would work, but you could then try manually editing the Discuss DB column names/format to match the Vanilla ones, then try importing them.

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    What about avatars and other uploads?
    Is BBCode, MarkDown or any other markup language used in your forum?
    Are there things like categories?

    I'm confident you could convert any forum to any other forum with enough effort.

    Some things you show above look quite mysterious:
    board = category?
    parent = ?
    icon = ?
    rank = ?
    integrated_ip = ?
    depth = ?
    answer = ?

    Are there anything like private messages?

    The order for importing should be:
    1. Categories (= boards?)
    2. Users
    3. Discussions (= topics)
    4. Comments
    5. Uploads

    And you should start with a clean Vanilla install.

    As whu606 already told, without a database dump it is near to impossible to provide you a solution. If you feel comfortable with SQL you could do it on your own by asking which tables to use and which columns might be corresponding.

  • I will provide a database in a few.

    I can’t right know because there are personnel info ( users ip, email… )
    

Ideally, I’d like to make change to Vanilla Porter to make it work with modx/discuss.

I’ll keep you updated.

    @R_J: Sent you a PM.

  • since porter provide a blue print, it is a good idea to us that and extend it.

    trying to users that the data relationship just with the database, isn't a good idea, becuase the framework itself is what govern that relationships.

    grep is your friend.

  • LincLinc Vanilla's Bard (and Director of Development) Detroit Vanilla Staff

    @Carlo_13 said:
    I can’t right know because there are personnel info ( users ip, email… )

    You can redact (delete) IP addresses and emails beforehand. They aren't critical to building a porter script.

    @Carlo_13 said:
    Ideally, I’d like to make change to Vanilla Porter to make it work with modx/discuss.

I’ll keep you updated.

    That is exactly what @R_J is offering to do. You don't "change" Porter, you add a tailor-made mapping script for each product you want to support. To do that, you need a) to know how Porter is setup, generally and b) a database to work with. It's easier to transfer b than a.

  • Hi, I'm back =)

    I’ve just created an install for Mamp on Mac. Download here.

    The zip file has to be extracted to “htdocs=>discuss”, and you need to create the database “discuss” and import it.

    That’s it! Just make sure you’re using php5.6

    Manager login is discuss/discuss.

    I wanted to make an install on cloud9, but I ran into some issues.

    sql is attached if needed.

  • whu606whu606 I'm not a SuperHero; I just like wearing tights... Moderator

    @Carlo_13

    I think the discuss.sql file should be enough.

    That imports fine into phpMyAdmin.

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    @x00 said:
    since porter provide a blue print, it is a good idea to us that and extend it.

    I haven't seen that before. It seems as if writing a porter for simple forum scripts is quite easy.

    I'll try my hands on the porter for that forum script.

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    Believe it or not but I seem to be to dumb to install MODX. Considered how many different CMS I already have looked at in my life and therefore needed to install myself, I'm a little bit disappointed of MODX. But based on your export I have a first working version of the porter. You can watch my progress here: https://github.com/r-j/porter/tree/feature/modx-discuss-package

    If you download that zip and extract it to your server, you can already test it.

    Here are the things which are guaranteed to be not working at all by now

    Users:

    • Avatars
    • Roles (as far as I can see there are no roles. Only moderators and users)

    Categories:

    • Header Categories are created but the structure is not imported. I'm not sure I will be able to get around that.
    • Permissions. Assigning moderators with different access rights requires different moderator roles in Vanilla. You will have to do that manually. It's not worth the effort to do that automatically (if it is possible at all)

    Discussions/Comments

    • Attachments

    Those are the main show stoppers to call that a finished porter. I'm not sure how much I'm able to do with the small sample file you gave.

    By the way: if you give it a try it will delete your Role table (that's something the porter seems to do by default, don't know why). Here is the code you could use to recreate the table:

    INSERT INTO `GDN_Role` (`RoleID`, `Name`, `Description`, `Type`, `Sort`, `Deletable`, `CanSession`, `PersonalInfo`) VALUES
    (2, 'Guest',    'Guests can only view content. Anyone browsing the site who is not signed in is considered to be a \"Guest\".', 'guest',    1,  0,  0,  0),
    (3, 'Unconfirmed',  'Users must confirm their emails before becoming full members. They get assigned to this role.',    'unconfirmed',  2,  0,  1,  0),
    (4, 'Applicant',    'Users who have applied for membership, but have not yet been accepted. They have the same permissions as guests.', 'applicant',    3,  0,  1,  0),
    (8, 'Member',   'Members can participate in discussions.',  'member',   4,  1,  1,  0),
    (16,    'Administrator',    'Administrators have permission to do anything.',   'administrator',    6,  1,  1,  0),
    (32,    'Moderator',    'Moderators have permission to edit most content.', 'moderator',    5,  1,  1,  0);
    

    Afterwards you can assign all roles to your users.

    After you have finished all that you should run www.example.com/dba/counts

    whu606Adrian
  • Carlo_13Carlo_13 New
    edited October 13

    OMG it works!

    The only issue I ran into is:
    Data file directory (/Applications/MAMP/htdocs/forum/uploads/import/import) is not writable.

    So I had to create the file import/import. But expect that, it works!

    I will make some more test and get back to you

  • Ouch... found something.

    All default vanilla default users are deleted ( admin, moderator, guest... ).

    Users are not assign to moderator role.

    It can be done manually though

  • @Carlo_13 a dit :
    Ouch... found something.

    All default vanilla default users are deleted ( admin, moderator, guest... ).

    Users are not assign to moderator role.

    It can be done manually though

    Sorry, you actually mentioned it in your previous post :p

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    Discuss seems to have "categories" and "boards" where categories are containers for boards.
    Vanilla only has categories but they are more flexible and can serve for both purposes. When you edit a category you can see a drop down "Display As" where you can change the behaviour of a category.

    I've made the importer import the discuss-categories, but there container function is lost. You have to reorder your categories after import.

    It would be great if you could provide some samples of

    • users with avatars (I'm interested in the columns avatar and avatar_service of the modx_discuss_users table, nothing more)
    • posts with attachments (some lines form modx_discuss_posts_attachments and the corrsponding lines from modx_discuss_posts where modx_discuss_posts_attachments.post = modx_discuss_posts.id)

    The more data you provide, the better the porter will be.

    Discuss uses BBCode. If you like that, you should add $Configuration['Garden']['InputFormatter'] = 'BBCode'; to your /conf/config.php

    Adrianterabytefrelance
  • All right, I will send later on a live version of a website. I will make it ready for Mamp/Mac to avoid you head ache ( modx uses absolute path in config file ).

    But again, expect the users/roles datas, it works really well.

    I don't know how to thank you guys!

  • LincLinc Vanilla's Bard (and Director of Development) Detroit Vanilla Staff

    @R_J FWIW, we never bother installing the software and go purely by database forensics. Sometimes we'll look at an existing site to confirm things, but that's about it. Trying to install old busted software can take longer than writing a porter. Sounds like you're off to a great start :)

    Adrian
  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    @Carlo_13 said:
    All right, I will send later on a live version of a website

    I will only need the modx_discuss_* tables and you shouldn't post the package here since it will contain data which your users do not want to be published - their mail addresses and the IPs, I guess.

    You can send me a PM.

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    @Linc said:
    @R_J FWIW, we never bother installing the software and go purely by database forensics. Sometimes we'll look at an existing site to confirm things, but that's about it. Trying to install old busted software can take longer than writing a porter. Sounds like you're off to a great start :)

    The porter is an impressive piece of work! I guess that everyone with basic SQL understandings can start writing a porter, although finishing it might require Vanilla knowledge

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    @Carlo_13 said:
    All right, I will send later on a live version of a website. I will make it ready for Mamp/Mac to avoid you head ache ( modx uses absolute path in config file ).

    But again, expect the users/roles datas, it works really well.

    I don't know how to thank you guys!

    The best way to thank is to provide more data so that I can finish my work :wink:

  • @R_J

    Sorry got caught up with my job :( . I'm preparing a local install and will send it today. ;)

    R_J
  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    Thanks for that! That should enable be to continue my work. As far as I can see there are no avatars used in your forum and there seem to be no attachments and I guess no one has ever written a message to anybody else.

    So in regard to those features the porter will stay incomplete, but I'll try to do my best to get the other info into the porter.

    Carlo_13
Sign In or Register to comment.