New Blog Look

Link. August 12, 2006. Comments [1]. Posted in: Blogging | Personal
I've just uploaded and configured my new theme 'Commonality2' for my weblog. I had been wanting to change my weblog's look and feel for a while now, but only recently did I get any ideas as to the new look I wanted. It's a fairly simple, sober style, which is what I prefer.

Any comments, good or bad, are appreciated :)

Enabling FeedFlare on dasBlog

Link. April 15, 2006. Comments [2]. Posted in: Blogging

I spent some time last night fooling around with some of the options available from FeedBurner (which is an excellent service, by the way), and decided to enable the FeedFlare features. Doing so for your feed is trivial, since feedburner serves it with all done automatically for you.

FeedFlare.pngHowever, enabling it for your site does require you to add a <script/> tag to your item template. I implemented this fairly easily in the end (though it took me a while to figure out how) by creating a custom dasBlog macro. Here's the code for the macro:

//
// FeedFlareMacros.cs
//
// Author:
// Tomas Restrepo (tomasr@mvps.org)
//

using System;
using System.Web;
using System.Web.UI;
using newtelligence.DasBlog.Runtime;
using newtelligence.DasBlog.Web.Core;

namespace Winterdom.Commonality.Macros
{
   public class FeedFlareMacros
   {
      protected SharedBasePage _requestPage;
      protected Entry _item;

      public FeedFlareMacros(SharedBasePage page, Entry item)
      {
         _requestPage = page;
         _item = item;
      }

      public virtual Control FeedFlare()
      {
         const string scriptTag = "<script src=\"http://feeds.feedburner.com/{0}?flareitem={1}\" type=\"text/javascript\"></script>";

         string feedburnerName = _requestPage.SiteConfig.FeedBurnerName;
         if ( feedburnerName != null && feedburnerName.Length > 0 )
         {
            string script = string.Format(scriptTag, feedburnerName, HttpUtility.HtmlEncode(Utils.GetPermaLinkUrl(_requestPage.SiteConfig, _item.EntryId)));
            return new LiteralControl(script);
         }
         return null;
      }
   }
} // namespace Winterdom.Commonality.Macros

I then simply enabled it in the web.config file and inserted this into my blog template:

   <%FeedFlare()|FeedFlare%>

Not the most elegant solution, I'm sure, but it did the trick :). Seeing how Scott already went through this, I'm guessing a future dasBlog build might have built-in support for this stuff.

 

Past Articles by Sam

Link. March 26, 2006. Comments [0]. Posted in: .NET | Blogging
My good friend Sam Gentile has posted links to some of the articles and posts he has written in the past throughout the several incarnations of his weblog. There is some incredible stuff over there, so make sure you read it.

I've always been impressed with how versatile and knowledgeable Sam is on everything he works on since I first met him online back in 2002 or so, and you owe it to yourself to check everything Sam has written about; you'll be sure to learn a thing or two! My personal favourites are the ones on Agile development and architecture :-)

DasBlog 1.8 Pingbacks not working

Link. February 23, 2006. Comments [1]. Posted in: Blogging
After my dasBlog 1.8 installation, I noticed that it doesn't seem to be able to handle pingbacks. Well, actually it accepts the pingback just fine from the remote server, generates the notification email correctly, but fails to save it to the .dayfeedback.xml file.

Instead, I see this in dasBlog event log:

Error:
System.IO.IOException: DasBlog.Util.FileUtils: Error accessing d:\websites\winterdomcom\Weblog\content\2006-02-21.dayfeedback.xml, perhaps it is in use by another process?
at newtelligence.DasBlog.Util.FileUtils.InternalAssertIfNull(FileStream file, String name) in C:\Dev\DasBlog CE\source\newtelligence.DasBlog.Util\FileUtils.cs:line 104
at newtelligence.DasBlog.Util.FileUtils.OpenForWrite(String fileName) in C:\Dev\DasBlog CE\source\newtelligence.DasBlog.Util\FileUtils.cs:line 35
at newtelligence.DasBlog.Runtime.DayExtra.Save(DataManager data) in C:\Dev\DasBlog CE\source\newtelligence.DasBlog.Runtime\DayExtra.cs:line 231
at newtelligence.DasBlog.Runtime.BlogDataServiceXml.InternalAddTracking(Tracking tracking) in C:\Dev\DasBlog CE\source\newtelligence.DasBlog.Runtime\BlogDataService.cs:line 1425
at newtelligence.DasBlog.Runtime.BlogDataServiceXml.TrackingHandler() in C:\Dev\DasBlog CE\source\newtelligence.DasBlog.Runtime\BlogDataService.cs:line 1448
while processing Unhandled Exception from TrackingHandler.



The specified .dayfeedback.xml file does not get created, actually, so I don't think locking is the problem here. Also, everything else (including comments and entries) get written correctly to the same directory, so I'm not sure it is a permissions issue.

Any ideas?

Minor dasBlog problems

Link. February 6, 2006. Comments [1]. Posted in: Blogging
After the dasBlog migration this weekend, I discover a one issue that is causing some of the posts I imported to dasBlog not to be displayed. Sort of.

Most individual posts will show up correctly, and all will be displayed correctly on the per-date pages. Except, for a few entries that will show up on the per-date page but not will fail to render if you follow the entry's permalink (either the name-based one, or the guid based on). What's more annoying: you don't get a 404 error back, just an empty page, as  dasBlog seems to just choke on the request.

So, here's an example: go to http://www.winterdom.com/weblog/default,date,2006-01-09.aspx. Try to follow the link for the first post in the page, and you'll get a blank page (no html generated at all).

When that happens, dasBlog will leave in it's log an entry similar to the following:

Error:
Entry was not found: 572 at newtelligence.DasBlog.Web.Services.AggregatorBugHandler.ProcessRequest(HttpContext) at System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep, Boolean&) at System.Web.HttpApplication.ResumeSteps(Exception) at System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext, AsyncCallback, Object) at System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest) at System.Web.HttpRuntime.ProcessRequest(HttpWorkerRequest) at System.Web.Hosting.ISAPIRuntime.ProcessRequest(IntPtr, Int32)
while processing .



AFAICT, the problem seems to be with the post-date handling. I have my dasBlog installation configured to use my timezone (UTC-05:00), and all the imported entries have all dates and times specified in the same timezone in the .dayentry.xml files. It seems, that when the time the entry has reported is too close (how close I haven't verified yet) to the end of the specified day, dasBlog will just fail to display the entry completely. At least that's my appreciation of the problem.

Also, a really newbie question. What timezone should dasBlog be saving the dates for entries created in dasBlog directly? At least for my site, it seems to be saving the time in UTC-08:00, which seemed rather weird to me.

Any ideas?

Update: I think I've managed to fix this. The problem, in essence, is that while the date & times stored in dasBlog's content XML files are in "Local Time" (whatever the local time is for the server itself, hence the -8:00 I was seeing), the actual date in the XML filename should be in UTC. This is not very intuitive, as it means that if you open a file named, say, 2006-01-10.dayentry.xml, you might find that the dates on the entries contained therein actually reference an earlier or later day.

If anyone spots any entry giving trouble, please let me know and I'll see if I hosed anything else up :)

Syndicate

About

Tomas Restrepo is a software developer located in Colombia, South America. His interests include .NET, Connected Systems, PowerShell and lately dynamic programming languages. More...

tomasrestrepo @ twitter My Flickr photostream My saved links on delicious My Technorati Profile

email: tomas@winterdom.com
msn: tomasr@passport.com

View my profile on LinkedIn

MVP logo

Ads


Categories

Statistics

Total Posts: 1050
This Year: 1
This Month: 1
This Week: 0
Comments: 825

Archive

Other

Copyright © 2002-2008, Tomas Restrepo.

Powered by: newtelligence dasBlog 2.2.8279.16125

Sign In