One of the original problems I've had with the blog engine behind this site (.Text, aka DotText) is that it's not localized.

Previously, I described a quick change, and today, I've worked out a simpler method. One cannot understand how Scott could have missed this obvious solution.

Instead of the original
dt = string.Format(dateformat, (int)reader["Month"], (int)reader["Day"], (int)reader["Year"]);
ac.Date = DateTime.ParseExact(dt,"MM/dd/yyyy",en);

which is not friendly in different locales, and suffers from certain issues.

I've updated it to read,

ac.Date = new DateTime(reader["Year"], (int)reader["Month"], (int)reader["Day"]);

This solution doesn't depend on the date format of the chosen locale.

In addition, I've recently added a list of most recent comments, and also updated the antispam control so that it doesn't require the blog user to enter numeric codes, if the user is logged in.

Portions of the solution to discover whether the user is an administrator or not, depends on the Security class of the Dottext.Framework namespace.

I've decided not to link the antispam control directly to the Dottext.Framework namespace, hence, I decided to use reflection to discover whether the user is currently authenticated and logged in.

The following code shows portion of the reflection code I've written.

    public class Security
    {
       public static bool IsAdmin
       {
         get {
                  Assembly asm;
                  Type LSecurity;
                  Boolean Result = false;

                  try
                  {
                      asm = Assembly.Load("Dottext.Framework");
                      LSecurity = asm.GetType("Dottext.Framework.Security");
                      Result = (Boolean) LSecurity.InvokeMember("IsAdmin",
                      BindingFlags.Public | BindingFlags.Static | BindingFlags.GetProperty, null, null, null);
                  }
                  catch
                  {
                  }
           return Result;
         }
       }
    }