Part 5, Moving Forum threads from CommunityServer to DotNetNuke

By: Chris Hammond Google+
Published Date 2/6/2011
Last Updated Sunday, February 06, 2011 1:19 AM

This is the fifth post in a series of blog posts about converting from CommunityServer to DotNetNuke.

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.

Series of 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

This is Part 5, bringing over Forum Threads

If you haven’t read the previous posts I would recommend that! This blog talks about CsToDNN_2.sql, and assumes you have already replaced the various strings discussed in Part 3. The CsToDNN_2.sql script is used to pull over the Forum threads, replies are pulled over in the CsToDNN_3.sql script (future blog post)

The script starts out by getting the number of threads we’re going to need to loop through. Next we truncate a table called cs_forums_topics, this table is used for keeping track of the CommunityServer PostId and the DotNetNuke TopicId. This will be important during the importing process, and also after we’ve got our DotNetNuke site running so that we can properly map the old CommunityServer URLs to DotNetNuke.

After truncating the table we go through and PostIDs from CommunityServer, at this point we’re just populating that table, nothing more. Later in the script, and the CsToDNN_3 script we will be updating the cs_forums_topics table with the matching id.

After populating that table the script then primes the first post to import, setting up a number of variables that we’re going to use when populating the DNN Forum module. At this point the script does a while loop, initially inserting the primed forum post into DNN using the Forum_Post_Add_Conversion script that we created in the CsToDNN_1.sql script. After adding the forum thread the script updates the cs_forums_topics table, and then the loop primes the next thread to add before starting the loop over. This while loop will repeat until all of the threads are imported.

With my forum which had around 40k threads, this script ran fairly quickly, 5-10 minutes if I recall correctly (it’s been a few months).

Side note: while reviewing the scripts for this post I noticed that there were a few things that needed changing, so I checked in new changes. After I’m done with this series I will do a new release of the CsToDNN package, until then check out the Source page.

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 email address so that we may contact you if necessary. We will also use this for your Gravatar.
Enter the URL to your website. URLs may be removed from comments.
Enter your comment here.
If you can't type Human in, you can't post, plain and simple.
Submit Comment Cancel

Chris Hammond is

Chris Hammond is a father, husband, leader, developer and car guy. Chris has long specialized in ASP.NET and DotNetNuke development, so you will find a variety of topics here on the website. For more information check out the about me page.

If you are looking for DotNetNuke consulting please visit my business website at http://www.christoc.com/

Disclaimer

Any blog posts here are solely the opinion and views of Chris Hammond only. Comments on blog posts are the opinion of the commenter, and not Chris Hammond.

Powered By

This website is managed by Christoc.com Software Solutions

DotNetNuke Hosting

Hosting for this website is provided by AppliedI.Net. Be sure to visit them for all your DotNetNuke Hosting needs. 

Find Me