New and Improved Comment System for BlogEngine.NET

Update: When I switched hosting providers and upgraded BE.NET, I didn’t migrate the changes to the comment system to the newer version.  This post describes my updates to version 1.x, but is no longer being used on my website. BlogEngine.NET had a pretty decent commenting system, but it lacked some of the functionality I wanted in a comment system for my blog. So I decided to update it myself, which turned out to be a bigger deal than I thought it would be. Still, after a few evenings of work, I got my comment system. The following is a summary of the new additions. ...

March 2, 2010 · 3 min · filip

Blogengine.NET – reCaptcha 0.93 Installation Instructions

EDIT: These post exists for archival purposes only. The linked files are no longer available. These installation instructions now apply to version 0.95 First, the linked ZIP file contains the updated files for installing the Recaptcha control. UPDATES: Version 0.95 – Changed initial loading method to fix error that occurred in certain cases in IE. If upgrading from 0.94, you only need to replace the Recaptcha.cs file.Version 0.94 – Logging fixesVersion 0.93 – Added logging.Version 0.92 – The recaptcha will no longer get focus after it has been loaded. Install procedure is unchanged from version 0.91.Version 0.91 – Changed the way that Recaptcha is verified.  It should no longer be possible to bypass the recaptcha by manually executing JavaScript on the page.Version 0.9 – Initial Version Quick Installation First, back up your files in case you need to revert for any reason. If you have not modified any of the BlogEngine files, you can extract the ZIP linked to above and place all of the files into their proper locations ( the unzipped files should contain a folder structure ). There is no need to recompile. ...

February 26, 2010 · 6 min · filip

Looking back… Bloodforge several years ago

I’ve known about the Wayback Machine for a while, but for some reason, I never visited the site – until today. It was such a strange feeling seeing what Bloodforge looked like back in 2001, and being able to see how it progressed over the years (the site was up since 1999 actually, but there is no record of that in the archive). I’ve actually pulled up some items from the archive. One of those is the logo that you can see at the top-left of the page. ...

February 24, 2010 · 2 min · filip

Blogengine.NET Recaptcha 0.91 Installation Instructions

NOTE: THESE INSTALLATION INSTRUCTIONS HAVE BEEN UPDATED: To get the latest version, follow the instructions located at: NO LONGER AVAILABLE First, the linked ZIP file contains the updated files for installing the Recaptcha control. UPDATES: Version 0.92 – The recaptcha will no longer get focus after it has been loaded. Install procedure is unchanged from version 0.91.Version 0.91 – Changed the way that Recaptcha is verified.  It should no longer be possible to bypass the recaptcha by manually executing JavaScript on the page.Version 0.9 – Initial Version Quick Installation ...

February 21, 2010 · 5 min · filip

Async Recaptcha for BlogEngine.NET 1.6

The instructions on this page are no longer valid for the latest version. I really am getting sick of the spam that is appearing on this blog, so yesterday I decided to implement Recaptcha for BlogEngine.NET. I had three main goals: Easy to implement – as any control, it needs to be pretty trivial to add it to an existing blog instanceConfigurable via the Extensions panel – I really like what BlogEngine has done with their ability to edit extensions, so I wanted the control to be configurable in this wayIt had to be asynchronous – when a user posts a comment, I don’t want the whole page to refresh The final solution is pretty close to what I had in mind.  The extension is a single file that needs to be inserted into the ‘/App_Code/Controls’ folder.  In addition, two lines of code need to be added/modified in the ‘/User controls/CommentView.ascx’ file. ...

February 20, 2010 · 4 min · filip

Disabling Comments for Blacklisted IP addresses

I was reading through the discussions on Codeplex for Blogengine.NET, and a user (ALBsharah) had an interesting idea for controlling spam: if we can already determine that a user is blacklisted based on the IP, do not even give them the ability to post new comments.  The thread is available here. Making this change to BE is relatively simple.  The first change was actually creating a function which would return whether the user is blacklisted.  Comment moderation methods seem to be located in the CommentHandlers.as file in the BlogEngine.Core project. All of this code was actually already written in another method ( ModeratedByRule ), I just needed to extract that code out of that method, and modify that method to use the new code – I hate having code that does the same thing in two different places.  So, where before the function looked like the following: ...

February 18, 2010 · 3 min · filip

Extract Formatted Text From Excel Cell With C# (Rich Text Format)

I was writing an application that needed to convert text in a cell in an Excel workbook to HTML. It is fairly trivial to get formatting for the entire cell, but each individual character in the cell could have different formatting itself, so I needed something more specific than cell-level formatting info. At first, I started using the Excel.Range.get_Characters( pos, len ) method to get info out of the cell.  The code would loop through all characters, get them one by one, and check the formatting.  For example: ...

September 17, 2009 · 2 min · filip

Something is seriously wrong with our airlines

Today I was reminded exactly of why I hate flying.  A couple months ago, I purchased a ticket to fly to Krakow, Poland.  I live in Cincinnati, and it is not possible to have a direct flight into Poland.  The best you can do from CVG is a one-stop flight.  I really wanted as few stops as possible, so I paid $1360 for a ticket with only one stop ( Chicago ). I could have saved myself $600 on the ticket and bought a multi-stop ticket for around $700, but I just wanted the trip to be as quick as possible. ...

May 14, 2009 · 3 min · filip

Deleting Comments…

If you leave comments on my blog for the sole purpose of providing links to your own blog, those comments will be removed. I have no problems with people linking back to their own site in a comment, but if you do that, at least attempt to stay on topic.

January 12, 2009 · 1 min · filip

Flexible AutoComplete (Suggested Words) Code for Text Input Fields using JavaScript

This post was written a long time ago, and since then many other great solutions have come out to accomplish this task. I have kept my post for historical reasons, but the files are no longer available and the code on the page is no longer functional. As I’m sure you’ve seen on many websites, displaying suggestions while a user types text into a text field has become quite popular. However, I was rather disappointed with the solutions I’ve found out there. The solutions I’ve found had any combination of the following problems: ...

November 14, 2008 · 4 min · filip