Mar 17 2010

Comment / SPAM Moderation

Category: BlogEngine.NETJRBlack @ 18:48

For me, the best recent feature in BlogEngine.NET v1.6 is what they labeled as Comment Moderation.  THIS is a killer feature for even my simple blog that in 2009 only got 1,500+ hits in 2009, but yet still seems to be plagued with comment SPAM.  With this comment moderation, you can moderate all comments, set up rules and filters to block SPAM. 

Here is what the Configuration screen looks like.

image image

Here is a look at the Spam tab, the Inbox looks similar.

image
image

Here you can select multiple Spam comments and delete them, restore them to the Inbox tab or clear them from the list.

No suspected SPAM comment will display in your blog, unless you approve it.  Click on the comment text and you will get this dialog:

image

In the dialog above you can choose to block or allow the IP address of the commenter.  If need be, you can edit the actual comment text.  At the bottom of the dialog you can update the comment, restore the comment (undo any changes), Delete the comment and cancel.

Clearly this is a welcomed feature to BlogEngine.NET and provides a lot of power to the blog administrator.

Tags: , ,

Mar 14 2010

BlogEngine.NET Nested Comments

Category: BlogEngine.NETJRBlack @ 17:46

Nested comments are quite cool and have been included in BlogEngine.NET for the past few releases, but I never got around to implementing them into my theme.  I learned it was quite simple.

Edit CommentView.ascx file and…

add this code line somewhere at the bottom of the display of the comment,
maybe near the <%= AdminLinks %>,
add this bit of code:  <%= ReplyToLink %>
This will add a Reply link to the bottom of each comment.

And just before the end of the file, add the following line of code before the last close div tag.

  <div class="comment-replies" id="replies_<%=Comment.Id %>" 
<%= (Comment.Comments.Count == 0) ? " style=\"display:none;\"" : "" %>> <asp:PlaceHolder ID="phSubComments" runat="server" /> </div>

This will display the comment form right under the reply link when you click on the reply link.

 

Next, edit the theme style sheet and the following style class.

.comment-replies {
    background: transparent url(../../pics/reply-arrow.gif) no-repeat 2px 2px;
    padding: 0 0 0 15px;
    margin: 5px 0 0 0;
}

This will indent the reply comment with a little arrow.

 

Sample:

image

Tags: ,

Mar 12 2010

BlogEngine.NET 1.6 upgrade

Category: BlogEngine.NETJRBlack @ 17:09

BlogEngine.NET v1.6 has been out since Feb 1, so I figured it was about time I upgraded.  I like to check the available documentation regarding upgrading and I got some conflicting ideas and methods.  David suggested I download a copy of my blog, make edits, over-write files, delete folders and upload the blog when complete.

This sounded like more hassle then it was worth.  I use XML (not SQL Server) as my data and here is what I did:

Unzip the contents of the BlogEngine.NET v1.6 to NewBlog folder.

Download a copy of your App_Data\Settings.xml file and update it with new features from new release and over write the new Settings.xml in NewBlog\App_Data with this updated file.
<commentsperpage>20</commentsperpage>
<moderationtype>1</moderationtype>
<numberofreferrerdays>1</numberofreferrerdays>
<commentblacklistcount>2</commentblacklistcount>
<commentwhitelistcount>1</commentwhitelistcount>
<enableerrorlogging>False</enableerrorlogging>
<trustauthenticatedusers>True</trustauthenticatedusers>

FTP to your current blog installation and…

  • Delete App_Code\ExtensionManager folder and all it's contents
  • Delete App_Code\Extensions\Akismet*.*
    • This is ONLY required if you have previously installed this extension in an earlier release.  The Akismet SPAM feature is now an included option in the base of BlogEngine.Net

IF you use or have made any changes to the default themes in BlogEngine.Net (Standard, Mobile and Indigo), you will need to update these themes in v1.6 in NewBlog\themes prior to uploading v1.6 to your server.

Upload all folders/files to the NewBlog\ folder EXCEPT for the \App_Data folder and all the files with in it.

Upload just the Settings.xml from the App_Data folder that you updated earlier on.

That is it, load your home page.

Tags: ,