Life is like Code, you never know what you will create next

Top Post and Top Comment Widgets for BlogEngine.Net

27. April 2009 09:00 by Scott in   //  Tags: ,   //   Comments (3)

Recently I found a post on Stackoverflow for someone looking for a Top Posts widget.  I knew I had created one, but not yet posted it.  So here is the post.

Download the Zip file and add the extension to the extensions directory and add the widgets to the widgets directory.  The top posts widget will only update every 30 minutes because it wouldn't need to be updated so frequently.

So here they are:

The Top Posts widget allows you to view how many times each post was viewed.

The Top comments widget allows you to see how many comments were posted on each post.

Hope it helps everyone out and as you can see on my right side, it works on my machine! (17.46 kb)


If you liked this post, please be sure to subscribe to my RSS Feed.

SEO and BlogEngine.Net

19. November 2008 19:12 by Scott in   //  Tags: , , , , , ,   //   Comments (1)

In the world of blogs, people can find many types of Blog Engines out there.  The list is vast and non-exclusive which includes but is not limited to:

  • Google Blogger
  • WordPress
  • BlogEngine.Net
  • SixApart
  • Movable Type
  • InstantSpot
  • And More...

I am not here to discuss which blog is the best.  I am here to discuss the transformation of the SEO (Search Engine Optimization) that BlogEngine.NET has succeeded in. SEO is a big game in the world of having an online presence.  You need people to be able to find what they are looking for and get out.  People don't want to spend forever looking for something that they want to solve.  That is what made Google so popular is the fact that they have search well established and it works.

After BlogEngine.NET released version 1.2 (currently at 1.45), they sent out a call for new ideas and thoughts.  That call was answered with many comments, but one in particular I think helped shape the strategic world of BlogEngine which gives it the ability to compete with the other blogs listed above. The user called for many upgrades in BlogEngine for SEO and I think they listened.

Big SEO request (and, honestly, slight aggravation),

The main blog index page is not very conducive to SEO. You have two fields in setup. First field is title, second is description. The description should NOT be appended to the title. If I want it appended to the title, then I'll add it myself in the title field. Further, I do not want my "Pages" in the keywords. I want to add my own custom keywords for the main page. The only other option would be for me to re-create the home page as a separate page and add custom keywords and description, but that's pain. (Please note, that the posts pages are fine. I'm only talking about the front page.) Now, when you look up my site in google, the description is messed up. And, unfortunately, there's no way to change it until the next release. I can't disable your description and keyword mechanism either. It would be great to at least be able to put my own description and keywords in the custom header, but google treats that as "overlooading" and throws both references of the META out.

From an SEM, I must say while the project as a whole it a great piece of work, the SEO, however, hasn't been thought through enough.

Please fix.

I can't tell truly where the changes were made, but they were as in what I can now show you. If you search for any of these topics, you will find my blog in the top 15 or 20 results or even higher.

The facts show for them selves.  BlogEngine.Net has a large amount of SEO maintained in it.  It does a great job with it.  The code is beautiful and works well unlike a platform like WordPress where the code is just a mess.  In choosing a Blogging platform/engine, I would hope that everyone gives BlogEngine a very close look as for it is one of the best I have seen.  The engine has come a long way and hopefully will continue into the far reaching future.

The basic idea of this post was to show you that if BlogEngine.NET does one thing GREAT, then it most likely does other things GREAT as well and should be extensively looked at before starting a new blog.

kick it on

If you liked this post, please be sure to subscribe to my RSS Feed.

BlogEngine.Net 1.XX where have you gone?

7. November 2008 12:34 by Scott in   //  Tags: ,   //   Comments (75)

First off, I want to clearly state that BlogEngine.Net is the best piece of blogging software I have seen since Live Writer for Windows.  I support this Blog provider and I have found this platform incredibly resourceful and worth its weight in gold.  The community is vast and still growing along the way.  I am increasingly proud of Mads and his team for what they have done with ASP.NET and BlogEngine.

But, the last update was in August 2009 and it is now November.  The hasn't been uploaded since September and the current road map goes no where.  No specified date attached with the road map. I personally think there still is need for a bit more work to fully compare this blog with Wordpress or  It currently doesn't support multiple blogs, email to blog, and text message to blog (lifestreaming idea) in which all of its current competitors are either there or surpassed what I just stated.


The question is, has the development moved slowly for BE or is it currently being taken over by more important projects?  I would at least like to see an updated road map that defines the goals for BE. 

Mads, if your reading this could you give us an update on the status of BE and where the development for it is going?



kick it on
If you liked this post, please be sure to subscribe to my RSS Feed.

One more reason why GoDaddy is Awesome!

9. April 2008 00:13 by scott in   //  Tags: ,   //   Comments (7)

Today, I have a problem with my "Quotes of the Day" Widget by nyveldt. I received an error today with my BlogEngine.Net blog. I was at work and couldn’t get home to fix it and I didn’t want to lose my user base. So I went into GoDaddy and clicked on the File Manager tab.

I then tried to download the Web.config file from GoDaddy which didn't seem to work. I then checked mark the file and clicked Edit. GoDaddy actually pulled up the source code of the file. WOW! I was impressed. I changed the Debug Errors to Off so I can view the problem at work. I then went to the XML file it have a problem with and again, clicked edit and it opened the file right up. I changed the problems and it fixed right away. Wow. I was impressed that I could edit the files right on GoDaddy. That is one more reason I love GoDaddy. Thanks to the GoDaddy developers, I got my page right back up and running.

RSS Add-in for BlogEngine.Net that reminds readers to sign up to RSS

6. April 2008 23:08 by scott in   //  Tags: , ,   //   Comments (0)

I was reading along blog posts and saw a reminder at the bottom of the post to sign up to the RSS.  I debated with my self for a few seconds and decided against it because its just some ploy to get you to sign up.  Heh.  So I created my own ploy.  I created an extension that sits at the bottom of every post and reminds the user with the text you prescribe and the RSS link you prescribe.

It was something small that only took like an hour, but I think it will be a good constant reminder to readers that they can and should (hehe) sign up to the blog because they enjoyed your post.

So here it is.

Basically, you just drop it into the folder BlogEngine/App_Code/Extensions.  It is a nice little feature that you can see, I have already installed.

I currently have one glitch in the code that I can't figure out.  If you use another theme except for mine, you will end up with a space after the link for the RSS.  Why, well I have deduced that it is the little picture that sits next to links that shows it will open in a new window.  For some reason though, the picture doesn't actually show up.  Hmm.  So if you can fix this glitch, I will give you credit both in the Extension and this Blog.

Thanks Guys and Happy Blogging

kick it on

GoDaddy setup with BlogEngine.NET (Step by Step)

17. March 2008 20:43 by Scott in   //  Tags: ,   //   Comments (0)

I recently had to setup all my new blogs on GoDaddy this past weekend and it was a pain!  Let me tell you what, I would hope that others find this post so they don't have to go through the same thing.  I found a old post with not up to date information on setting it up.  So here is the up to date version as of 3/12/08 and GoDaddy Hosting Control Center V2.5.0.

1. Go to and go download the entire source located here.
2. Remove the following line from web.config.  This is due to Godaddy has medium trust set on the site.

    		<!--<trust level="Medium" />-->

    3. Publish the site using any sort of FTP upload client or even Visual Studio.  I would not compile the website.  Let the website compile it self on GoDaddy.
    4. Open up GoDaddy and the Site Configuration manager.
    5. Go to the File Manager.


6. Check Mark the App_Data folder and then click the permissions button as circled below.


7. Set the access to Read, Write and Reset all children to inherit.  This will allow all files under it to inherit the above settings.  This allows you to move files in and out of App_Data folder and not having to keep updating the permissions in GoDaddy.


8. Click okay and then move on over to IIS Settings.


9. Create a Folder called App_Data.  Before you complete the next step, let me advise you that BlogEngine did not say to do this, but I found it to be the only way to get BlogEngine to work. So now Click on the Advance button.  Click the Classic Settings.  From here it will take a few hours to set up and if the admin's are really good, it will be done in about 30 minutes.


10. Happy Blogging!

kick it on

Twitter App for

9. March 2008 16:57 by scott in   //  Tags: ,   //   Comments (5)

Here is my first thought on things.

I just created a twitter account, I know its a long time.  But since I created my blog with the idea of wanting to get the word out about what I think.  I decided to go searching for a twitter control for the  Which I found one at Codeplex, it is called BlogEngine.NET Twitter Extension.  I went to look at the application and I was satisfied, but I only found that the application just gives the latest feeds of what you published in twitter.  I wanted to give it more extensibility like the JavaScript version of the Twitter badge.

The current Twitter application on codeplex like I said only does the updates without any times, dates or user names.  I decided to upgrade the application to include how long ago the message was sent and a link to the message on twitter.  This took a few hours actually to dive into the old code and produce the new stuff. I hope you like it.

To Download:

Twitter.cs (8.22 kb)

To Install:

BlogEngine.NET 1.3 (1.2 ?)
How To
1. Download source code. Put the Twitter.cs file in App_Code/Controls folder of your BlogEngine.NET site.
1. Télécharger le code source. Copier le fichier Twitter.cs dans le dossier App_Code/Controls de votre site BlogEngine.NET.
2. Add the following line in the page where the control should appear.
2. Ajouter la ligne suivante dans la page où le contrôle doit s'afficher.
<blog:Twitter ID="Twitter" runat="server" Username="julesss" Password="mypassword" />
- Username (required) : username of your Twitter account
- Password (required) : password of your Twitter account
- Timeline (optionnal) : updates type to display from Twitter : User, Friends or Public (default : User)
- NumberOfStatuses (optionnal) : number of updates to display (default : 20, which is the maximum recommended by Twitter)

The lines I personally edited is around line 141.

The old code was:

   1:  string innerText = status["text"].InnerText;
The New code I inserted is:
   1:                      string innerText = "\"" + status["text"].InnerText + "\"" + "<br />"
 + "<a href='" + status["user"]["screen_name"].InnerText + "/statuses/" 
+ status["id"].InnerText + "/'>";
   2:                      string TwitterTime = status["created_at"].InnerText;
   3:                      string[] TimeValues = TwitterTime.Split(' ');
   4:                      TwitterTime = TimeValues[1] + " " + TimeValues[2] + " "
 + TimeValues[5] + " " + TimeValues[3] + " GMT";
   5:                      DateTime dt = Convert.ToDateTime(TwitterTime);
   6:                      innerText += GetRelativeDate(dt);
   7:                      innerText += "</a>";

I also inserted a new method that allows for the relative time to be found.

   1:          /// <summary>
   2:          /// gets the relevant time of the current twitter user.
   3:          /// </summary>
   4:          /// <param name="date"></param>
   5:          /// <returns></returns>
   6:          private String GetRelativeDate(DateTime date)
   7:          {
   8:              DateTime now = DateTime.Now;
   9:              TimeSpan span = now - date;
  10:              if (span <= TimeSpan.FromSeconds(60))
  11:              {
  12:                  return span.Seconds + " seconds ago";
  13:              }
  14:              else if (span <= TimeSpan.FromMinutes(60))
  15:              {
  16:                  if (span.Minutes > 1)
  17:                  {
  18:                      return "about " + span.Minutes + " minutes ago";
  19:                  }
  20:                  else
  21:                  {
  22:                      return "about a minute ago";
  23:                  }
  24:              }
  25:              else if (span <= TimeSpan.FromHours(24))
  26:              {
  27:                  if (span.Hours > 1)
  28:                  {
  29:                      return "about " + span.Hours + " hours ago";
  30:                  }
  31:                  else
  32:                  {
  33:                      return "about an hour ago";
  34:                  }
  35:              }
  36:              else
  37:              {
  38:                  if (span.Days > 1)
  39:                  {
  40:                      return "about " + span.Days + "days ago";
  41:                  }
  42:                  else
  43:                  {
  44:                      return "about a day ago";
  45:                  }
  46:              }
  47:          }

I hope you like it as much as I do.  By the way, did I tell you its written all in ASP.NET and C#.  There's another fine example of a GREAT language!

kick it on