Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForumForumCommunity Server Forum to DNN ForumsCommunity Server Forum to DNN Forums
Previous
 
Next
New Post
10/11/2010 5:22 PM
 
Since I've had a little more time to play around with our servers I've started working to convert our Community Server forum tables to DNN forums and was curious if anyone else has gone thru this process.

I've successfully copied the data from the CS Sections Table to the DNN Forums_Forums table and reproduced all the basic forum sections / post data. I've been working on converting the threads / posts and that's been a little more problematic. As far as I can tell all the data is in the appropriate tables but no data is presented in the forum module.

Here are the SQL queries I've been playing around with to copy the data from point at to point b:

-- Building forum sections
SET IDENTITY_INSERT [DNNPE_DEV].[dbo].[Forum_Forums] ON
INSERT [DNNPE_DEV].[dbo].[Forum_Forums] (
ForumID,
Groupid,
IsActive,
ParentID,
Name,
Description,
CreatedByUser,
UpdatedByUser,
UpdatedDate,
TotalPosts,
TotalThreads)
SELECT
[CSDATABASE].[dbo].[cs_Sections].[SectionID],
1,
[CSDATABASE].[dbo].[cs_Sections].[IsActive],
[CSDATABASE].[dbo].[cs_Sections].ParentID, 
[CSDATABASE].[dbo].[cs_Sections].Name,
[CSDATABASE].[dbo].[cs_Sections].Description,
1,
1,
CURRENT_TIMESTAMP,
[CSDATABASE].[dbo].[cs_Sections].TotalPosts,
[CSDATABASE].[dbo].[cs_Sections].TotalThreads
FROM [CSDATABASE].[dbo].cs_Sections
where [CSDATABASE].[dbo].cs_Sections.GroupID = '34'

-- Building forum posts
SET IDENTITY_INSERT [DNNPE_DEV].[dbo].[Forum_Posts] ON

INSERT [DNNPE_DEV].[dbo].[Forum_Posts] (
[PostID]
    ,[ParentPostID]
    ,[UserID]
    ,[Subject]
    ,[Body]
    ,[CreatedDate]
    ,[ThreadID]
    ,[PostLevel]
    ,[TreeSortOrder]
    ,[FlatSortOrder])
SELECT 
[CSDATABASE].dbo.cs_Posts.PostID,
[CSDATABASE].dbo.cs_Posts.ParentID,
[CSDATABASE].dbo.cs_Posts.UserID,
[CSDATABASE].dbo.cs_Posts.Subject,
[CSDATABASE].dbo.cs_Posts.Body,
[CSDATABASE].dbo.cs_Posts.PostDate,
[CSDATABASE].dbo.cs_Posts.ThreadID,
[CSDATABASE].dbo.cs_Posts.PostLevel,
[CSDATABASE].dbo.cs_Posts.PostLevel,
[CSDATABASE].dbo.cs_Posts.PostLevel
FROM [CSDATABASE].dbo.cs_Posts
WHERE SectionID = 108 or SectionID = 109 or SectionID = 110 or SectionID = 111

-- Building forum threads
INSERT DNNPE_DEV.dbo.Forum_Threads (
ThreadID,
ForumID,
Views,
LastPostedPostID,1
Replies)
SELECT 
[CSDATABASE].dbo.cs_Threads.ThreadID,
[CSDATABASE].dbo.cs_Threads.SectionID,
[CSDATABASE].dbo.cs_Threads.TotalViews,
[CSDATABASE].dbo.cs_Threads.MostRecentPostID,
[CSDATABASE].dbo.cs_Threads.TotalReplies
FROM [CSDATABASE].dbo.cs_Threads
WHERE SectionID = 108 or SectionID = 109 or SectionID = 110 or SectionID = 111

A couple of things I've found thus is that DNN uses 0 for the ParentPostID column on a new thread, I've also created a new post thru the DNN UI to see what columns I didn't auto populate so I manually updated: In Posts ( DateApproved, Notify, RemoteAddr ) In Threads ( PollID )

I'm sure I'll figure it out eventually but thought I'd ask to see if anyone has already done this.
 
New Post
10/12/2010 3:31 AM
 
I believe Chris Hammond has done this before (he is out for a few days). As the author of the module, I do think you may want to upgrade to Forum 5.0 if possible first (Chris had ugpgraded to the 4.6 beta 2 if I remember correctly which is almost what 50 is). The db schema has been simplified since the last release (4.5.3), this site is running it and it should be officially released in a week or two. (You can get it now at dnnforum.codeplex.com). 

A couple general  notes:
  • Yes, ParentID = 0 means it is the first post in a thread.
    • Threads are created when a post is created that has a parentid of 0, once postid is retrieved this is when thread is created (with ThreadID = to that new PostID we just created). 
  • 5.0 version of the module doesn't have treeview order/flat order to worry about (all hierarchy here is based on parentid).
    • 5.0 Also offers an exposed API for posting (may not work great for a migration like this though)
    • Notify column was removed here.
  • You have to create a module instance manually. Then, any groups you create need to be associated w/ that moduleid (and portalid too I think)
    • Forums are associated w/ groups (not sure how you are going to get forums/groups from CS exactly)
  • RemoteAddr is for IP address.
  • You have to consider how you are going to match up users. 
    • CS likely has their own way (never looked at db). You will need these users in dnn first (before posts), then in your Forum_Users table (associated w/ the proper PortalID and UserID). 

Chris Paterra

Get direct answers to your questions in the Community Exchange.
 
New Post
10/14/2010 4:30 PM
 
Yea the CS / DNN forum tables are actually quite similar.

CS: Sections = DNN: Forums
CS: Threads = DNN: Threads
CS: Posts = DNN: Posts.

The biggest difference I've seen is that DNN uses 0 as the parent post id where as CS uses a duplicated postid field. I thought that perhaps the fact that I didn't have my user db populated that it was causing the the forums posts to not populate so I tried replacing a couple of the values with the ID for the admin account. I checked out Chris's blog post the other day but it looks like he only did a blog conversion which I believe we figured out.

As far as the GroupID goes right now I'm manually setting that via an SQL insert/update.

Perhaps I'll try upgrading to a newer test version to see if that helps.
 
New Post
10/15/2010 11:56 AM
 
I upgraded my DNN instance to 5.5.1 and tried to install both the 4.6 Beta and the 5.0 RC which resulted in an install error Error Installing Module(s):
Forum (05.00.00) .

I tried messing around with Active Forum Module and was able to convert our CS data to that but in ideally we'd like to stick with the OOTB Forum module since it has functionality that better suites our needs.

Is there any kind of error log that gives details as to why a module would fail to install?
 
New Post
10/18/2010 2:47 PM
 
I'm pretty sure I just figured it out. I need to write some new SQL queries and I'll post them once I've verified they work,
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForumForumCommunity Server Forum to DNN ForumsCommunity Server Forum to DNN Forums


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out