brokentwig (@brokentwig)

Forum Replies Created

Viewing 24 replies - 1 through 24 (of 24 total)
  • In reply to: Vanilla 2 Converter

    brokentwig
    Participant

    @brokentwig

    What did you do Jack?

    In reply to: Vanilla 2 Converter

    brokentwig
    Participant

    @brokentwig

    You also might want to check purge last import.

    In reply to: Vanilla 2 Converter

    brokentwig
    Participant

    @brokentwig

    Jack, try running it again, but this time after it fails with zero to convert, just hit start again. It did that to me yesterday. Make sure you check import users.

    In reply to: Vanilla 2 Converter

    brokentwig
    Participant

    @brokentwig

    The Vanilla.php you posted at https://bbpress.trac.wordpress.org/ticket/2179 worked fine. Thanks alot for the help getting this dialed in and submitting it for inclusion in the coore build. I’m sure there’s a few people out there itching to get off of Vanilla.

    In reply to: Vanilla 2 Converter

    brokentwig
    Participant

    @brokentwig

    Yeah, I think your right. I think we should just leave the `from_expression’ => ‘WHERE User.Deleted = 0′` out completely. It would just orpan items anyway. I pulled my notes from the doc. With all that said, I’ll download the Vanilla.php you posted in the codex and give her a run on my test server. I think she’s done.

    In reply to: Vanilla 2 Converter

    brokentwig
    Participant

    @brokentwig

    Maybe it will work the way it is. Users who login via some other method still have thier username and email stored in the User table and are for all intents and purposes a “User”. Our converter will convert whatever is in the Password blob, but it won’t match thier 3rd party password (I tested it). These users will need to use the password reset in WP to fix this. I think either you can add this to your codex, or I can make a note at the bottom indicating some users will need to reset thier passwords, so maybe a mass email notifying users of the change will handle it. I don’t think there’s anything we can do with the converter to solve this.

    In reply to: Vanilla 2 Converter

    brokentwig
    Participant

    @brokentwig

    Actually, it just got a lot more complicated. It appears when I sign in via Facebook, Google, or some other method, a username is created in the User table, a password is saved as a Blob, the HashMethod is “Vanilla”, but another tables holds the authentication token and it’s source (Facebook, Twitter, etc). I’ll dig in deeper to find out if there’s some way to easily filter out 3rd party authenticators and then deal with thier password differently.

    In reply to: Vanilla 2 Converter

    brokentwig
    Participant

    @brokentwig

    I’m not 100% confident “Banned” are Role 1, and “Confirm Email” are Role 3 on all Vanilla databases. Due to the complexity, I think it should be left out. I posted my SQL queries in your codex codes under the “Notes” section. Feel free to tweak my comments to your style.

    Maybe you can help me with the password checker. It looks like I can reference the entire record row using the callback methods in the converter code. I just don’t know what to do if the password type isn’t a Vanilla password. What is the proper action here, and is this code/syntax correct?

    ` public function callback_cleanpass( $password, $row) {
    if ($row[‘HashMethod’] == ‘Vanilla’) {
    return $password;
    } else {
    return ?????;
    }
    }`

    In reply to: Vanilla 2 Converter

    brokentwig
    Participant

    @brokentwig

    Stephen,
    I’m not sure what you mean by “Once bbPress core converter is updated we can filter the users imported”. I believe we need to add the ‘from_expression’ => ‘WHERE User.Deleted = 0’ back into the first user section, but if your saying the core converter can do it, how does the core know who’s deleted?

    Also, is there a way we can check for the password type in the User table, and then if the type is not Vanilla, do something else? I didn’t dig into how you guys handle passwords you can’t convert, but I’m pretty sure a Facebook auth token will be one of those off cases. I would be happy to help test and work on this more to produce a finished product.

    In reply to: Vanilla 2 Converter

    brokentwig
    Participant

    @brokentwig

    Nice.

    In reply to: Vanilla 2 Converter

    brokentwig
    Participant

    @brokentwig

    Disreguard that, It’s in your revision.

    In reply to: Vanilla 2 Converter

    brokentwig
    Participant

    @brokentwig

    Stephen,
    Looks like you pulled out the custom callback I created to cleanup the parent ID on Categories. In Vanilla, the parent is -1 instead of 0. Unless it’s in there and I missed it, my callback fixed that so it came back as a 0. (callback_forum_parent)

    In reply to: Vanilla 2 Converter

    brokentwig
    Participant

    @brokentwig

    That’s great your including it in the core. I put the filter back in the Users section that excludes the Deleted users and updated the Gist again. That filter worked, the UserRole join was what we were jacking with up above; never got that to work.

    One thing left to do:

    1) Passwords with a type of Vanilla are the same hash that WP uses, so they convert over nicely. Vanilla allows you to integrate a user with Facebook, and some other systems. I didn’t have any of those users, but some kind of call-back would need to be built for it. Also, this converter includes some password functions at the bottom, but I don’t think it’s used.

    Outside of that, I got a perfect conversion from this one. I would also be happy to post the SQL code I used to clean up the User table, and also SQL code I used to move posts from Vanilla Users that already existed in WP (Admins and authors).

    In reply to: Vanilla 2 Converter

    brokentwig
    Participant

    @brokentwig

    Jack,
    You can try this one, it’s works for me. A couple notes, I didn’t finish the “Tags” section because I don’t have any tags in my Vanilla Forum. Also, I didn’t have any child Categories, but the converter “should” work for parent/child Categories. I also removed the code that excludes Deleted and Comment Email statuses, so those will get imported.

    https://gist.github.com/4591432

    I have a full test server setup however, and would happy to help tweak this converter so it works for you.

    In reply to: Vanilla 2 Converter

    brokentwig
    Participant

    @brokentwig

    Stephen,
    I think I made a couple tweaks to the Vanilla2 during final testing. Have you tested the version you have, or should I post my latest version?

    In reply to: Vanilla 2 Converter

    brokentwig
    Participant

    @brokentwig

    One more thing Stephen, is the converter supposed to convert Topic Subscription? If not, do you have any idea where that’s stored in WordPress/bbPress?

    In reply to: Vanilla 2 Converter

    brokentwig
    Participant

    @brokentwig

    Yeah, all the Vanilla tables are prefixed with “GDN_”. I was mostly trying to work it out in the converter file so I could share it with others that might be trying to convert. Vanilla is pretty popular, so there’s gotta be a few out there tired of Vanilla’s poor integration with WordPress. Unless there is an easy way to filter them, I’ll just run the SQL statement above, that clears them out nicely. Thanks alot for your help.

    In reply to: Vanilla 2 Converter

    brokentwig
    Participant

    @brokentwig

    Of course, this is probably the easiest way to clean out deleted and un-confirmed users, but it would be cool to build it into the converter for others to use. Vanilla has no way of cleaning these by default.

    `
    DELETE GDN_User
    FROM GDN_User
    LEFT OUTER JOIN GDN_UserRole ON GDN_User.UserID = GDN_UserRole.UserID
    WHERE GDN_UserRole.RoleID = 3 OR GDN_User.Deleted = 1
    `

    In reply to: Vanilla 2 Converter

    brokentwig
    Participant

    @brokentwig

    I created a public shared GitHub doc of my current Vanilla2.php. You can find it here: https://gist.github.com/4591432

    Thanks for the help. I’m going to continue messing with it.

    In reply to: Vanilla 2 Converter

    brokentwig
    Participant

    @brokentwig

    I’m not using any joins on the other user blocks. Doing that causes other problems. After some work, I managed to get your example working on UserID, but then it can’t find the password and other fields from the UserRole table; even though I left the other user sections referencing the User table. I’m assuming, like you said, all the user stuff is getting combined into one huge query, I’m just not sure how to work withing that process. I’ll keep digging tomorrow. Thanks for the help.

    In reply to: Vanilla 2 Converter

    brokentwig
    Participant

    @brokentwig

    The reversed join you provided above didn’t do it either. Firebug says:

    `
    SELECT convert(User.Password USING “utf8”) AS Password,convert(User.Name USING “utf8”) AS Name,convert(User.Email USING “utf8”) AS Email,convert(User.DateInserted USING “utf8”) AS DateInserted FROM GDN_User AS User LIMIT 0, 100
    `

    In reply to: Vanilla 2 Converter

    brokentwig
    Participant

    @brokentwig

    I tried reversing the join alreay, but I’ll try again. This doesn’t work either:

    ` $this->field_map[] = array(
    ‘from_tablename’ => ‘User’,
    ‘from_fieldname’ => ‘UserID’,
    ‘join_tablename’ => ‘UserRole’,
    ‘join_type’ => ‘INNER’,
    ‘join_expression’ => ‘USING (UserID) WHERE UserRole.RoleID != 3 AND User.Deleted = 0’,
    ‘to_type’ => ‘user’,
    ‘to_fieldname’ => ‘_bbp_user_id’
    );`

    In reply to: Vanilla 2 Converter

    brokentwig
    Participant

    @brokentwig

    From Firebug inspection, the converter is ignoring the join altogether for the user import.

    In reply to: Vanilla 2 Converter

    brokentwig
    Participant

    @brokentwig

    I’m well beyond the docs you referenced. I have the Vanilla 2 importer working, but there is a couple things I’m trying to correct. 1) I would like to filter the users to confirmed only, but the filter expression doesn’t apply. I’ve tried including the where conditions as a from_expression as well as putting them both in the join_expression. It just doesn’t look like the converter is referencing my filter.

    ` $this->field_map[] = array(
    ‘from_tablename’ => ‘User’,
    ‘from_fieldname’ => ‘UserID’,
    ‘from_expression’ => ‘WHERE User.Deleted = 0’,
    ‘join_tablename’ => ‘UserRole’,
    ‘join_type’ => ‘INNER’,
    ‘join_expression’ => ‘USING (UserID) WHERE UserRole.RoleID != 3’,
    ‘to_type’ => ‘user’,
    ‘to_fieldname’ => ‘_bbp_user_id’
    );`

    2) I would like to import all users as “Participants”, but all users come into the system with no bbPress role selected.

Viewing 24 replies - 1 through 24 (of 24 total)