BlogEngine.NET 1.6.1 Rocks

by Xavier Pacheco 25. June 2010 06:27

image

I am really liking the update to the BlogEngine.Net platform. There are several new features but my absolute is the Comment Management and Comment Spam Filtering feature. I get a ton of comment spam - you know, those stupid comments like, “Hi, interesting post. I have been pondering this issue,so thanks for posting. I will visit your blog again” or This is by far one of my favorite updates you have done, I don't agree on some points but you are good blogger for sure.” These aren’t real comments. Such comments are used to increase search engine ranking to the URL provided with the comment. You can read about comment spam here. Needless to say, I am thrilled that BlogEngine.Net has provided me a way to deal with this. According to their website:

Comments across all posts can be viewed, edited, deleted or approved in one convenient area.  Comments can still be manually moderated, but now moderation can be automated by running comments thru remote or local comment spam validation services.

There are other new features. You can see a list of them here.

The update was relatively easy. Most of the pain was getting the site to run under IIS 7 on my local machine so that I could test the update. Anyway, it required a few changes to my Settings.ini file, my theme’s .css file and deleting a directory that is no longer needed. That said, it was a smooth update.   By the way, there is a great post on dealing with the IIS 7 issues here.

Happy blogging!

 

Tags:

BlogEngine.NET

BlogEngine.Net: Page Level Security

by Xavier Pacheco 23. August 2009 13:17

I needed a way to achieve page-level security for a BlogEngine.net deployment. Brian Carter on his blog provides a pretty good solution with a user control that you simply put on the page you want to secure.  You’ll find it here: BE.N Page Security User Control. One modification I had to make was to the SecurityRole.ascx.cs file. The Page_Load even contains logic to redirect a user to the login page if that user does not belong to the role specified in the user control parameter (see his website for instructions). I simply modified the path to my own page as shown below.

            if (!isInRole) Response.Redirect("~/page/LeaderNot.aspx");
 

Have fun!

Tags:

ASP.NET | .NET | BlogEngine.NET | C#

Two PostList Extensions to the BlogEngine.net Platform

by Xavier Pacheco 5. June 2009 02:06

My blogging platform of choice is the open-source BlogEngine.net. Why? Because if there's a feature not inherently supported, I can simply fire up Visual Studio and write it myself. Ok, so BlogEngine.net is not for the faint of heart when it comes to blog deployment, but for power bloggers who are unsatisfied with the limitations of other platforms, BlogEngine.net is that way to go.

This post is about two features that I needed to develop myself. I am making them available here for other BlogEngine.net users.

1. An Author-filtered post list for non-blog pages

BlogEngine.net has the capability to add static web pages. This enables you to use BlogEngine.net as more than just a blogging platform. I have used BlogEngine.net to develop regular websites, for instance see www.CubScoutPack55.com and www.xapware.com.

I needed to add a bloglist to a static page, however the list should display only posts for a given author. Note that this is not the same as the standard filtered postlist supplied with BlogEngine.net. Already, there is a user control (\user controls\PostList.aspx) that you can embed within a static page by entering the following text into the page's markup:

uc1

That's all fine except that I need display only posts by a specific author. Therefore, I created the AuthorPostList.ascx user control. The entry in the static page markup now becomes:

uc2

You will see this implemented in the cub scout site: www.CubScoutPack55.com where each den page has its own author, the Den Leader for that page. When a certain Den Leader, say for instance the Tiger Den Leader, enters a blog post, his post will show up only in his page. This is handy because it allows me to distribute blog posts according to the poster.

You can download the control at the bottom of this post. To use it, simply pop it in your "/User controls" directory and add the following text to any static page.

uc3

2. A Category-filtered post list for non-blog pages

I recently created a blog for my family at: www.PachecosInColorado.com. We have a major event happening and wanted to create a static section within our site to keep our family and friends up to date (we are adopting from Ethiopia). In the same way that I embedded author specific posts on a static page, I want to embed category specific posts on a static page. Therefore, only posts related to the "Adoption" category would appear on the page for adoption. Posts in other categories like recipes, home-schooling, etc, would be filtered out.

My solution was to create the CategoryPostList.ascx user control. It is also located in the user controls directory. To use it, you simply put the following into the markup of the page where you want the posts to appear:

uc4

That's it! You can download this control here. Try it out and feedback, corrections, comments, questions are welcome.

The Controls

AuthorPostList

CategoryPostList

Tags: ,

ASP.NET | BlogEngine.NET

This site is Hosted by WebHost4Life

Join WebHost4Life.com

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2012 X Talks Tech