Al Nyveldt

Adventures in Code and Other Stories

I finally finished up my customizable BlogEngine.NET theme.  I started it long ago to see how easy it would be as well as how much you could actually do within a BlogEngine.NET theme without changing the code base.  I ended up taking the theme much further than a theme should go and decided to scale it back to what you see here.

NonZeroVideo A customizable theme to me is a theme that has options to change the look and display without requiring the user to work with the code pages. 

I went ahead and made a screencast to show you how it looks to an administrator and see exactly what is customizable about this theme.  For those unwilling to sit through the 90 seconds or so, here are the items that can be customized in this theme.

  1. Layout: fixed or fluid (fixed to 1024 width or to fill the screen)
  2. Color: 5 color styles to choose from
  3. Columns: 2 or 3 column layout
  4. Open Text section: Just a title and content box that can be filled in with whatever you'd like to see.  (I use it for an "About Me" section on the sidebar.)

I'm excited to see customizable themes like this mixed with the new widget framework in the next version of BlogEngine.NET.  It will make it a snap for people to make their blogs look exactly how they want.  A lot of the features I had added into this theme originally removing items, reordering, etc, is done much better in the the widget framework that Mads Kristensen has started.

That's it.  Go ahead and try it out.  There are likely some issues with it, so if you find any problems, let me know.  (You are welcome to send me the fix as well.)

Download: Theme-NonZero1.3.zip

Quote1 I love quotes.  I enjoy seeing new quotes and I like to save them if it is handy.  I used to have a text file of quotes I collected, but it was lost in the great hard drive crash of 2007.

As I do enjoy quotes, I made a BlogEngine.NET widget for use in themes for collecting quotes and displaying a new one everyday.  I've been using it for a few months now and I'm finally getting around to sharing it with the BlogEngine.NET community.

"Uhhhh, ok, Al.  So you what exactly are you giving me?"

Great question.  I'm sharing a widget (or control) you can add to an existing theme.  Yes, this will only help someone who is interesting in working on modifying themes.  I'll likely release this theme, Refresh, with the control embedded in the coming days, but until then, you get the widget by itself.  The widget is simply a standard user control (an ascx file) and its code-behind file.

QotDWidget Let me show you how it works.  I made a short (under a minute) screencast showing you how the widget/control works.  For those, to impatient to watch or just completely sick of my screencasts, here is the text version.

As you'd expect, the widget shows you a new quote everyday from your collection of quotes.  It will pick a new quote based on when it was last displayed.  When you are logged in however, it gives you buttons to allow you to add, edit, delete, and navigate your quotes collection.  It is fairly simple.  No admin page, no hassle.  Just drop the control in your theme as you would any user control and it will work for you.

Quote2 "Wow... This is great.  I can just add this to my theme and my quotes will just magically be saved in my blog.  So where are these quotes stored?" 

Another excellent question.  To keep things simple, they are stored in an xml file in your App_Data folder.  Widget data will be provider based in the next version of BlogEngine.NET, but for now it is not.  When the widget is first run, it will find that there is no quotes.xml file and it will create it for you.

One thing I really like about this widget is that it is a simple piece of a theme.  It doesn't require you to install files in different places to use it.  I prefer to keep my blog add-ons as separate as possible from the rest of the blog.  (In other words, I think a theme should stay in its folder and not need files put in other places.  The same should go for extensions as much as possible.  This just makes updating my blog much simpler.)

This widget works fine in version 1.2 and 1.3 and can be downloaded here.

While I've very biased, I do really like BlogEngine.NET.  It is a fine blog software and handles my simple blog well enough.  However, there are a few features that are extremely nice and I wanted to take a moment to highlight them and make sure you are taking advantage of them if you are a BlogEngine.NET user.

1. Extensions Rock

When Mads Kristensen first introduced Extensions, I thought it was a cool idea, but I didn't really appreciate the power they could have on my blog.  Since almost everything the blog does has an event, it is so easy to extend the software to do whatever you can think for it to do.  Additionally, you can share that code with other BlogEngine.NET users or use extensions others have created to really enhance your blogging experience. 

In the past few months, I've put together 2 extensions for my own use and have used a number of extensions that others have created and made available on the web.  (Yes, I'll likely be making my extensions available soon, but you'll have to wait until then to learn what they are.)

If you haven't looked into them, check out this list of available extensions to get a taste of what they can do.

2. Complete Comment RSS

While I don't have a ton of comments to deal with on this blog, I never really liked getting comment notification in my inbox.  I get enough emails and it just wasn't an ideal place for me to get notified of comments.  I was thrilled when BlogEngine.NET put together Site Wide Comment RSS.  By that, I mean one feed for all my comments.  Having it in my feed reader seems like the perfect place for them to be.

In case you are unsure where this can be found, my comment feed is:

http://www.nyveldt.com/blog/syndication.axd?comments=show

BlogEngine.NET also supports individual post comment RSS and I love that too.  When I want to follow the feedback of something, I just add it to my reader.  It is awesome and is found in most blog systems.

3. Great Live Writer Support

Windows Live Writer (or Live Writer as I think they are going by now) is a great tool for blogging and BlogEngine.NET has some great integration with it.  In each release of BlogEngine.NET, we've added more and more features that can be taken advantage of inside Live Writer.  Beyond the basics of writing posts, BlogEngine.NET even allows Live Writer to add new categories, handle tagging, add and edit pages, set slugs, and turn on/off comments.  Combine this with the great plug ins available for Live Writer and you've got a handy blogging tool.

If you don't use Live Writer yet, you are really missing out.

4. Pages are first class citizens

While a blog is typically made up of post, pages can be an incredibly handy thing to have.  In a personal blog like this one, it can make for a fine About me page, resume, or nice place for articles.  However, they can be used more extensively and there really is no reason not too.  They are not a side show in BlogEngine.NET.

Pages can be set to be your front page and even link into related posts.  They are searchable and can really fill out your site nicely.  (While I don't use pages much in the blog, I do have a BE site that takes much better advantage of pages.)

5. Theming is very easy

I've had a bunch of different blog systems over the years and I've done a little theme work in a few of them.  BlogEngine.NET is just so easy to use.  If you've had any experience working with ASP.NET (and I mean any) you can quickly figure out how to move things around and make them look more how you'd like.  If you are a bit more adventurous, you can convert a free template or even make your own theme without having a deep knowledge of BlogEngine.NET.  I remember being shocked that I was able to make my first BlogEngine.NET theme in a 2 hour window and it seemed I spent half that time making decisions on where I wanted items verses trying to figure out how to do it (and that was before I joined the dev team and had spent any time really looking through the code.)

The next version of BlogEngine.NET will make customizations even easier, but if you've ever wanted a unique look for your blog, you own it to yourself to see how easy it really is now.  I made a theming screencast a while back that walk you through make one from scratch, talking through each step and it runs about 25 minutes.  If you start by copying an existing theme, you would likely cut your time in half.

SQLMembership The third screencast in my recent series is a walk through of setting up the SQL Membership and Roles providers in place of the default XML versions.  These SQL providers are built-in to the .NET 2.0 framework and are not BlogEngine.NET components.  BlogEngine.NET was designed to allow using these providers however and is fully supported.

This screencast is a bit longer than the previous two as I start without the membership and roles services in a database and walk you through creating these, checking permissions, setting up your web.config to use them and adding your initial roles and users in the database.

As before, it is available in both an in page flash version and Windows Media Video format.

Here is the web.config updates (for those interested):

[code:xml]



<membership defaultProvider="SqlMembershipProvider" >
      <providers>
        <clear />
        <add name="XmlMembershipProvider"
             type="BlogEngine.Core.Providers.XmlMembershipProvider, BlogEngine.Core"
             description="XML membership provider"
             xmlFileName="~/App_Data/users.xml"/>
        <add name="SqlMembershipProvider"
             type="System.Web.Security.SqlMembershipProvider"
             connectionStringName="BlogEngine"
             applicationName = "BlogEngine"/>
      </providers>
    </membership>



    <roleManager defaultProvider="SqlRoleProvider" enabled="true"
                 cacheRolesInCookie="true" cookieName=".BLOGENGINEROLES">
      <providers>
        <clear />
        <add name="XmlRoleProvider"
             type="BlogEngine.Core.Providers.XmlRoleProvider, BlogEngine.Core"
             description="XML role provider"
             xmlFileName="~/App_Data/roles.xml"/>
        <add name="SqlRoleProvider"
             type="System.Web.Security.SqlRoleProvider"
             connectionStringName="BlogEngine"
             applicationName = "BlogEngine"/>
      </providers>
    </roleManager>



[/code]

I stress in the screencast, these are the basic entries and lots of options could be added in.  These will get you on the right track however.

In case you missed it above, the links to the screencasts are here:

SQLProvider My second 1.3 screencast is a walk through of setting up the SQL Server provider from BlogEngine.NET.  It starts where the Installation screencast leaves off and takes you through database setup and updating your web.config. 

The SQL Provider setup changed a bit between versions 1.2 and 1.3 making the old screencast incorrect.  I hope to be writing a more detailed post about SQL provider setup in the day ahead.

Anyway, this is a very short video but hopefully someone will find it somewhat helpful.  It is available in both an in page Flash version and Windows Media format.

About

BioPic Hi. My name is Al Nyveldt and I'm a software developer from central Pennsylvania, USA.

I'm on the BlogEngine.NET development team and write on a variety of development related topics. More...

Follow me on Twitter
Contact me via email

Recent Comments

Quote of the Day

"And remember, no matter where you go, there you are."

- Earl Mac Rauch

Sponsor


Recommended Books



Archives


Disclaimer

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

© Copyright 2008

Sign in