Issam knows me too well. He
makes a comment about wanting a cool calendar for his blog and he knows I'm going to have to go off and mess with it. He probably knows that I have to rewrite it too ;)
Scott Mitchell started by
creating a very cool calendar control for
.Text.
Scott Watermasysk suggested a few improvements, and I did some looking and decided to do it my own way. Here's the main differences between my control and the one Scott Mitchell did:
- It doesn't modify the data base.
- Uses .Text's preexisting Cacher class to cache data for the monthly posts.
- Contains Scott Watermasysks' suggestions of deriving from dotText's BaseControl. Uses the UrlFormats class built into dotText for URL parsing and makes the Previous month and next months go directly to the month without a post back using UrlFormats.
- It's contained in a single ascx file.
I'm Running it on
.Text 0.95.
You can put it in your Skin's PageTemplate.ascx with
<overflow:DottextBlogCalendar id="DotTextBlogCalendar" runat="server"></overflow:DotTextBlogCalendar>
And register the TagPrefix with:
<%@ Register TagPrefix="overflow" TagName="DottextBlogCalendar" Src="DottextBlogCalendar.ascx" %>
I'm pretty tired so use it at your own risk but it seems to be working here. Let me know if you find any problems and I'll do my best to clean it up.
Download the control here:
http://blogs.pingpoet.com/overflow/pubfiles/DottextBlogCalendar_20040214b.zip
UPDATE: Based on some comments by Lawrence Liu I updated the link to a slightly newer version that has a minor bug fix in it related to links not showing for certain URL formats. The fix was made a long time ago. Not sure why I never updated the link.
Enjoy.
posted @ Saturday, February 14, 2004 4:32 AM