Part 6, Community Server to DotNetNuke Moving Forum replies and attachments

This is the sixth post in a series of blog posts about converting from CommunityServer to DotNetNuke. It has been far too long since Part 5, apologies for that!

A brief background: I had a number of websites running on CommunityServer 2.1, I decided it was finally time to ditch CommunityServer due to the change in their licensing model and pricing that made it not good for the small guy. This series of blog posts is about how to convert your CommunityServer based sites to DotNetNuke.

Previous Posts:
Part 1: An Introduction
Part 2: DotNetNuke Installation
Part 3: Converting users from CommunityServer to DotNetNuke
Part 4: Getting the conversion tables ready for CS  to DNN
Part 5: Moving Forum threads from CommunityServer to DotNetNuke
Part 6, Community Server to DotNetNuke Moving Forum replies and attachments
Part 7: CommunityServer to DotNetNuke handling URLs

Converting Forum replies

If you haven’t already, I would encourage you to check out the previous 5 blog posts, otherwise this post may have you lost! You can download the scripts for this process over at http://cstodnn.codeplex.com/ check out the source tab for all the latest as I haven’t done a new release lately, but I will after this blog series is done.

This blog post covers the 3rd SQL Script (CsToDNN_3.sql), as with all the scripts you should do a search and replace on a few terms (noted at the top of the file). The first thing we’ll do is go out and get the number of “threads” from the forums that we need to pull replies in for. Then starting with the first post that isn’t a new thread, meaning the first reply, we grab all the information for that reply and add it into the DNN Forum database.

Before grabbing the next reply we update the cs_forums_topics table, which houses the original CommunityServer ID and the new DNN Forum ID. This information will get used later so we can access the old CS urls and redirect them to DNN urls.

On a large forum this script will likely take the longest. I have seen anywhere from 30 minutes to 3-4 hours.

Grabbing the Forum Attachments

The next script is a quick one that I threw in after actually running the process on a website after some users complained that the attachments were missing. CsToDNN_4.sql is used to bring over the forum attachments into the DNN Forums.

The script is pretty simple, but you should only run it after you copy the storage folder from the /forums/ folder on your CommunityServer installation, you need to put the contents of the storage folder into your DNN installation in the /portals/#/forums/attachments folder (where # is the ID of your portal, typically 0 if you have one website in DotNetNuke).

Then run the script, that should bring over the attachments!

In the next blog post in the series I will talk about how to handle the old CommunityServer URLs and have them properly redirect to DotNetNuke URLs.

Recent Comments

There are currently no comments. Be the first to make a comment.

Add Comment

Please add your comment by filling out the field(s) below. Your comment may need to be approved before it becomes visible.
Enter your first name for display with the comment
Enter your last name for display with the comment.
Enter your comment here.
If you can't type Human2 in, you can't post, plain and simple.
Submit Comment Cancel

Chris Hammond

Chris Hammond

is a father, husband, leader, developer, photographer and car guy. Chris has long specialized in ASP.NET and DotNetNuke (DNN) development, so you will find a variety of posts relating to those topics. For more information check out the about Chris Hammond page.

If you are looking for DotNetNuke consulting please visit Christoc.com Software Solutions

Find me on Twitter, GitHub and LinkedIn.