Hi,
Mi website is under CS 2.1 SP2 and I'm currently changing my CS site organization: I was using one common blog and I decided to create different blogs to organize my blog posts.I would like to move some posts previously posted in my common blog to other blogs.
How can I move posts from one blog to another within the same CS site?
Thanks in advance for your answers
There are two choices for you:
1- You can use my BlogML to export posts from first blog to this format then import them to second one.
2- You can change some fields in database to move posts from one section (blog) to another. I don't recommend this second one though because one mistake can provide more troubles.
BlogML is a good choice, I think. Export all posts to this format then remove unnecessary posts and finally import them to second blog.
Keyvan NayyeriWaegis Anti-Spam Filter - Stay Away from Spams on Your Community Server Sites
Hi Keyvan,
Thanks a lot for your answer.Even though BlogML seems very nice, I think I still am gonna use choice 2 for one reason: I want the post to retain all their initial characteristics (Author Name, Date Posted, Number of Views, Tags, etc.) which BlogML doesn't seems to deal with.
Do you know which DB fields I should modify to move posts? Would changing SectionID value into the target blog SectionID in the cs_Posts table be sufficient? That way, all other data would be kept for the posts moved.
Thanks a lot for your help
Edit: After a first look at the DB structure, it seems that I would have to change values in at least 5 tables: cs_Posts, cs_Post_Categories, cs_Threads, cs_Referrals, cs_SearchBarrel. I'm gonna try to examine the DB structure more deeply to be sure I don't miss anything. Any help is welcome if somebody already did this before. It would be a good idea to develop a tool which could allow such moving operations since it's "just" database field changes.
I have the need to move posts from one blog to another in the same CS site and I also want to use the 2nd choice (SQL script). If anyone has a working script, please let me know. Thanks
This is a hasty solution I threw together for mass moving everything (posts, comments, etc.) from one blog to another. I'm not sure it is 100% ideal, but it works. I used it on a production site 5 days ago and I have not seen any evidence of any problems as a result. Everything got moved properly and all the info was retained.
If the old SectionID is 42 and the new one is 55, the query would look like this:
update cs_Post_Categories_Parents set SectionID = 55 where SectionID = 42 GOupdate cs_SectionsRead set SectionID = 55 where SectionID = 42 GOupdate cs_FavoriteSections set SectionID = 55 where SectionID = 42 GOupdate cs_vw_PostsWithAttachmentDetails set SectionID = 55 where SectionID = 42 GOupdate cs_ForumPingback set SectionID = 55 where SectionID = 42 GOupdate cs_BlogActivityReport set SectionID = 55 where SectionID = 42 GOupdate cs_PostAttachments set SectionID = 55 where SectionID = 42 GOupdate csm_MailingLists set SectionID = 55 where SectionID = 42 GOupdate csm_EmailIds set SectionID = 55 where SectionID = 42 GOupdate cs_PostAttachments_TEMP set SectionID = 55 where SectionID = 42 GOupdate cs_RollerBlogFeeds set SectionID = 55 where SectionID = 42 GOupdate cs_RollerBlogPost set SectionID = 55 where SectionID = 42 GOupdate cs_Post_Categories set SectionID = 55 where SectionID = 42 GOupdate cs_SectionTokens set SectionID = 55 where SectionID = 42 GOupdate cs_InkData set SectionID = 55 where SectionID = 42 GOupdate cs_ThreadsRead set SectionID = 55 where SectionID = 42 GOupdate cs_posts_deleted_archive set SectionID = 55 where SectionID = 42 GOupdate cs_Posts set SectionID = 55 where SectionID = 42 GOupdate cs_Referrals set SectionID = 55 where SectionID = 42 GOupdate cs_ModerationAudit set SectionID = 55 where SectionID = 42 GOupdate cs_LinkCategories set SectionID = 55 where SectionID = 42 GOupdate cs_Moderators set SectionID = 55 where SectionID = 42 GOupdate cs_SearchBarrel set SectionID = 55 where SectionID = 42 GOupdate cs_Threads set SectionID = 55 where SectionID = 42 GOupdate cs_nntp_Posts set SectionID = 55 where SectionID = 42 GOupdate cs_TrackedSections set SectionID = 55 where SectionID = 42 GOupdate cs_nntp_Newsgroups set SectionID = 55 where SectionID = 42 GOupdate cs_PostsArchive set SectionID = 55 where SectionID = 42 GO
The 3 tables not included above are:
cs_SectionPermissions
cs_Sections
cs_weblog_Weblogs
For moving just some posts or comments from one blog to another, a different approach is needed. It is a real pain. I would like to see CS implement a UI tool for moving content. Here is what I had to do to move 3 comments from one blog post to another.
In the example above the comment title wasn't changed so it still says, "RE: old topic" although it has been moved to "new topic." I didn't need to change that, but you might. If you need to change this, set a new text value for "Subject" in cs_Posts.
I assume this method surely misses some things that need to be updated. I'd appreciate hearing from others who have more info.
Copyright© 2008 Telligent Systems Inc. All rights reserved CommunityServer.com • Telligent.com