Today I pushed an importer script for Ning. I’ve only used it for one site, and plan to use it for a second site soon. I’m sure there will be many improvements to be made because no two imports are ever the same!
As with all importer scripts, edit the constants near the top of the file to point to your Ning archive files and set other options specific to your data.
Let us know if you’re doing an import from Ning. Contributions to improve this script are welcome!
NOTE: Ning 3.0 (the newest?) doesn’t have a way to export your data at all. So this importer can’t help unfortunately.
One issue I have run in to. It appears everyone imported as Level-1 users or higher. That included lots of users who have no posts associated with them. Seems like we would want those type of user accounts to come in as Level-0 only.
Any way to “mass correct” user levels to match the rules of the forum?
# cd /var/discourse
# ./launcher enter app
# rails c
User.all.each do |user|
cnt = Post.where(user_id: user.id).count
if cnt == 0
user.change_trust_level!(0)
end
# user.save # - shouldn't be needed here
end
Thanks @riking. Something like that will need to be added to the script.
@askmanny I notice that many users in Ning have “comments” attached to them, typically saying “Happy Birthday!”. Discourse doesn’t allow people to post public comments on user profiles. Any thoughts about how they should be imported?
We are having discussions about these kinds of comments, and how to go channel the need for them.
One possible approach is to create a Forum category that (moving forward) serves as a place for people to have more ‘general’ conversations like the ones people would have in the “town square”, more akin to the kinds of conversations that would happen between individuals, as opposed to community-wide topics. Makes sense?
It would be nice if the user portion of the import would default the “last seen” to the “created date” of the account. By default, that should (if I understand the restrictions) cause anyone that created an account in the last 365 days [default] to receive an email digest from the forum.
As it is now, the system does not appear to email the digests to anyone until they login the first time to the migrated forums.
It would be an improvement if the script would set the imported users default email settings to be the same defaults as any new user. Specifically the digest = weekly. At the moment, the import leaves the digest setting unselected.
It’s asking a lot of the users in a migration to have to proactively change settings and opt-in to the digest.
Yeah that’s a bug. Emails are disabled during import (as that code snippet shows), but we shouldn’t be changing default_digest_email_frequency. Digest emails won’t be sent during import. I’ll fix.
Imported users don’t get sent a welcome email. Moving users to the new forums is typically done gradually, by posting announcements on the old forums, pinned topic(s) on the new forums, blog posts, etc. I think it also makes sense to seed the welcome private message for all imported users too, so I’ll look into adding that to our importers.
One issue we ran in to was that Ning refused to export all off the profile pictures using their export tool. We went ahead with the import, but that left the system in a weird state where the have a blank profile picture.
The side effect for new users is that they don’t know there is an important menu option!
Anyway to identify and correct affected accounts such that they pull the gravatar avatars as if they had never uploaded an image?