My Introduction to BlogEngine.NET Extensions

One of the things I always liked about Community Server was its global event model, where you can hook into various events like User.OnCreate() to extend system functionality.  Well BlogEngine.NET has the same support in Extensions.  The list of exposed BE.NET global events as well as how to create an extension is located here in the BlogEngine.NET wiki.

I only wrote one extension for the initial release of DBVT2008, a simple text parser to mimic Community Server’s Blog Snippets in which [strings-in-brackets] are replaced with pretty much anything.  I use Blog Snippets on my Nordic Track book reviews like the one I posted yesterday.  At the bottom of that post is my signature Nordic Track thumbnail which I display by simply placing “NordicTrackPic” in brackets.  Here’s the class file. 

As a sidebar in praise of the VS2005+ Website Project model used by BE.NET, I realized I had a slight bug in my snippet extension code.  The thumbnail image wasn’t displaying in my newsreader because I didn’t enter the full url path.  I downloaded the .CS to my laptop, made the fix in Textpad, uploaded it back to /app_code/extensions and I was done.  No compile or even having to fire up Visual Studio.  Quick and easy.

Article written by

A long time developer, I was an early adopter of Linux in the mid-90's for a few years until I entered corporate environments and worked with Microsoft technologies like ASP, then .NET. In 2008 I released Sueetie, an Online Community Platform built in .NET. In late 2012 I returned to my Linux roots and locked in on Java development. Much of my work is available on GitHub.