{"id":66,"date":"2010-03-02T00:00:02","date_gmt":"2010-03-02T00:00:02","guid":{"rendered":"http:\/\/bloodforge.com\/?p=66"},"modified":"2020-02-20T02:56:37","modified_gmt":"2020-02-20T02:56:37","slug":"new-and-improved-comment-system-for-blogengine-net","status":"publish","type":"post","link":"https:\/\/bloodforge.azurewebsites.net\/index.php\/2010\/03\/02\/new-and-improved-comment-system-for-blogengine-net\/","title":{"rendered":"New and Improved Comment System for BlogEngine.NET"},"content":{"rendered":"\n<p><strong>Update: When I switched hosting providers and upgraded BE.NET, I didn&#8217;t migrate the changes to the comment system to the newer version. &nbsp;This post describes my updates to version 1.x, but is no longer being used on my website.<\/strong><\/p>\n\n\n\n<p>BlogEngine.NET had a pretty decent commenting system, but it lacked some of the functionality I wanted in a comment system for my blog. So I decided to update it myself, which turned out to be a bigger deal than I thought it would be. Still, after a few evenings of work, I got my comment system. The following is a summary of the new additions.<\/p>\n\n\n\n<h4>Comment Listing By Type&nbsp;<\/h4>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"364\" height=\"95\" src=\"\/wp-content\/uploads\/2020\/02\/comment_type_tabs.png\" alt=\"\" class=\"wp-image-67\" srcset=\"\/wp-content\/uploads\/2020\/02\/comment_type_tabs.png 364w, \/wp-content\/uploads\/2020\/02\/comment_type_tabs-300x78.png 300w\" sizes=\"(max-width: 364px) 100vw, 364px\" \/><\/figure>\n\n\n\n<p>The comments are now arranged in tabs, organized by type.&nbsp; Although the image above shows three types, there are actually four:<\/p>\n\n\n\n<ol><li>Spam<\/li><li>Unapproved Comments<\/li><li>Trackbacks (and Pingbacks)<\/li><li>Comments<\/li><\/ol>\n\n\n\n<p>The \u2018Spam\u2019 and \u2018Unapproved Comments\u2019 tabs are only visible to authenticated users. \u2018Trackbacks\u2019 and \u2018Comments\u2019 are only visible if there\u2019s something there. The number in parentheses next to each tab contains the number of comments of that type in the tab.&nbsp; It is also possible to have a \u2018Spam\u2019 comment in the \u2018Comments\u2019 tab, if that \u2018Spam\u2019 comment has a reply which is not spam.&nbsp; In such cases, the \u2018Spam\u2019 comment will be collapsed and users will not be able to see the contents, but they will be able to see the reply.&nbsp; The inverse applies to the \u2018Spam\u2019 and \u2018Unapproved Comments\u2019 tabs.<\/p>\n\n\n\n<h4>Comment Rating System\u00a0<\/h4>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"601\" height=\"60\" src=\"\/wp-content\/uploads\/2020\/02\/rating.png\" alt=\"\" class=\"wp-image-68\" srcset=\"\/wp-content\/uploads\/2020\/02\/rating.png 601w, \/wp-content\/uploads\/2020\/02\/rating-300x30.png 300w\" sizes=\"(max-width: 601px) 100vw, 601px\" \/><\/figure>\n\n\n\n<p> Visitors to this blog can now rate the comments, in\u00a0similar fashion to how users can digg items on Digg ( I even hijacked their thumbs up and down images, I hope they don\u2019t sue! ). <\/p>\n\n\n\n<h4>Improved Comment Administration Interface<\/h4>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"489\" height=\"55\" src=\"\/wp-content\/uploads\/2020\/02\/admin_comment_moderation.png\" alt=\"\" class=\"wp-image-69\" srcset=\"\/wp-content\/uploads\/2020\/02\/admin_comment_moderation.png 489w, \/wp-content\/uploads\/2020\/02\/admin_comment_moderation-300x34.png 300w\" sizes=\"(max-width: 489px) 100vw, 489px\" \/><\/figure>\n\n\n\n<p>In the current version of BlogEngine.NET, there are basically two comment states: Approved and Spam. I added a third comment state: \u2018Unapproved Comments\u2019. These are comments that have not yet been either approved or marked as Spam. In the current implementation on this blog, no comments ever&nbsp;go to the Spam tab automatically \u2013 they have to be placed there by a moderator. However, if they fail a Spam check, they will be marked as \u2018Unapproved Comments\u2019 and not be visible to the public.<\/p>\n\n\n\n<h4>The Code<\/h4>\n\n\n\n<p>If you\u2019re even thinking about putting this in your blog, you should read these&nbsp;<a href=\"https:\/\/104.236.209.206\/blogifier\/data\/filip-stanek\/2010\/3\/comment%20change%20log.txt\">release notes<\/a>. I have uploaded a file that contains all changes&nbsp;<a href=\"https:\/\/104.236.209.206\/blogifier\/data\/filip-stanek\/2010\/3\/bloodforge_comments.zip\">to this location<\/a>. However, keep in mind that these are&nbsp;<strong>NOT SIMPLE CHANGES<\/strong>. There was a lot of code modified, and&nbsp; you should be fairly familiar with ASP.NET before attempting to put these in your blog. You will need to recompile the BlogEngine.Core project to make this work. Also, if you are using anything other than the XmlProvider that comes with the blog as your data provider, you will need to update that for the comment rating and spam properties, as these are new.&nbsp; One other note about the zip containing the source: it assumes that you are also using the&nbsp;<a href=\"http:\/\/www.bloodforge.com\/post\/BlogengineNET-reCaptcha-093-Installation-Instructions.aspx\">reCaptcha control<\/a>&nbsp;I wrote not too long ago, although not all of the files necessary for the reCaptcha are in the zip.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Update: When I switched hosting providers and upgraded BE.NET, I didn&#8217;t migrate the changes to the comment system to the newer version. &nbsp;This post describes my updates to version 1.x, but is no longer being used on my website. BlogEngine.NET had a pretty decent commenting system, but it lacked some of the functionality I wanted [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"https:\/\/bloodforge.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/posts\/66"}],"collection":[{"href":"https:\/\/bloodforge.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bloodforge.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bloodforge.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bloodforge.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/comments?post=66"}],"version-history":[{"count":1,"href":"https:\/\/bloodforge.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/posts\/66\/revisions"}],"predecessor-version":[{"id":70,"href":"https:\/\/bloodforge.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/posts\/66\/revisions\/70"}],"wp:attachment":[{"href":"https:\/\/bloodforge.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/media?parent=66"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bloodforge.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/categories?post=66"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bloodforge.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/tags?post=66"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}