Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > Archiving blog comments View modes: 
User avatar
Member
Member
christine.quipsites-gmail - 4/30/2013 10:09:43 AM
   
Archiving blog comments
We have a client requesting to archive blog comments. Not the blog posts, just the comments. Anybody have a suggestion on how to do this?

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 5/2/2013 3:44:10 AM
   
RE:Archiving blog comments
Hi Christine,

just to inform others... the issue was discussed in the tickets but it requires DB access, can be done via API or directly via the DB but not just from the default CMS Desk.

Best regards,
Martin Danko

User avatar
Member
Member
christine.quipsites-gmail - 5/2/2013 7:40:53 AM
   
RE:Archiving blog comments
The request was not for the client to get the data out of the database as you discussed in the tickets. The request was to mark comments as archived so they don't show in the blog.

I figured out a way to do this by setting the Blog_Comment to show in the system tables and adding a bit field named IsArchived. Then I went into the code and added this so the user could mark a comment as archived, and to exclude any comments from being viewed that have this set to true. To get around not being able to change CMS.Blogs.BlogCommentInfo, I just created a couple procs to do the get and set for IsArchived.

This will pose issues if the client decides to ever upgrade Kentico. It would be nice if a future version would allow for setting blog comments to archived so they don't show in the blog but still exist in the data.

Objects involved to accomplish this:
* CMSModules/Blogs/Controls/Blogs_Comments.ascx
* CMSModules/Blogs/Controls/BlogCommentEdit.ascx
* CMSModules/Blogs/Controls/BlogCommentView.ascx
* CMSModules/Blogs/Controls/CommentFilter.ascx
* CMSModules/Blogs/Tools/Comments_List.xml
* CMSModules/Blogs/CMSPages/Comment_Edit.aspx
* CMSWebParts/Blogs/BlogComment.ascx
* CMSResources/CMS.resx
* App_Themes/Default/CMSDesk.css

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 5/2/2013 8:07:03 AM
   
RE:Archiving blog comments
Hi Christine,

I noticed my colleague Filip, who was solving the issue in the ticket, so thank you for clarification. I have already forwarded a requirement to our development team. We will consider this feature for a future version of Kentico CMS.

Anyway, thank you for your suggestion!

Best regards,
Martin Danko