Updated 7/10/09: Code updated with snippet to prevent looping of Internet Explorer 7 “Loading…” icon.

AddThis provides an easy way to allow readers of your blog to post to popular bookmark and social networking sites like delicious and digg. This post describes how to add an AddThis Share button at the end of your dasBlog postings.

1. Visit AddThis – Get Your Button and select the “Bookmarking and Sharing” button style of your choice.

image

2. Open your current theme’s itemTemplate.blogtemplate file for editing.

3. Modify the template code which appears after the post content to display the button and link it to your post permanent URL (PermalinkUrl macro) and title (itemTitleRaw macro). Here’s how the code looks in my theme itemTemplate.blogtemplate file (replace the values for the v and pub parameters below with the corresponding value returned when you obtained your script code in step 1):

<!-- AddThis Button BEGIN -->
<script type="text/javascript">
    var addthis_disable_flash = true;
</script>
<a href="http://www.addthis.com/bookmark.php?v=ZZZ&pub=ZZZZZZZZZZZZZZZZ" 
onmouseover="return addthis_open(this, '', '<%PermalinkUrl%>', '<%itemTitleRaw%>')" 
onmouseout="addthis_close()" onclick="return addthis_sendto()">
<img src="http://s7.addthis.com/static/btn/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="vertical-align:bottom; border:0"/></a>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js?pub=ZZZZZZZZZZZZZZZZ"></script>
<!-- AddThis Button END -->


4. Restart the IIS web site so dasBlog will reload your itemTemplate. If you can’t restart IIS directly, a trick to accomplish the same result is to add a blank line to Web.config and save it (ASP.NET automatically restarts a web application when Web.config is updated).

Bookmark and Share  Comments [0] | Permalink | dasBlog | WebDesign
 

Image of Drawing Hands by M.C. Escher

This week I installed Windows Live Writer (WLW) and set it up for posts to this blog. I was surprised how easy it was to install and create a new post. WLW can post to multiple types of blogs, all I had to do was select dasBlog and enter the admin account name and password and the wizard did the rest.

The editing environment is clean and functional and very Microsoft Word-like. WLW makes it possible to upload and position images and other rich content as though you were working on a local document. WLW lets you paste images from the clipboard into the post and does all the converting and uploading when the post is published - no more need to save screenshots to a local image file and then upload them. WLW provides a plugin model - I downloaded and installed the Precode syntax highlighter plug-in based on this post on Scott Hanselman's site.

Here's what it looks like when editing this post in WLW (the little squiggly lines are the SpellChecker, which does have an Add to Dictionary feature):

image

Bookmark and Share  Comments [0] | Permalink | dasBlog
 

dasBlog has a TagCloud feature which you can use to replace the Category List that is setup in most of the themes. Here's how I replaced the Categories listing displayed by default in the calmBlue theme with the Tags section you see in the right-hand section of this site.

First, decide if you want to create a new theme or modify the existing theme files. To create new theme, copy the contents of the theme you want to start from to a new directory and then update the theme.manifest file with a name and other meta-info for your new theme.

Next, open base.css and add CSS for the required TagCloud styles (you can modify these to be whatever you like, they just have to be present for the tags to display):

/* TagCloud styles */
.tagCloud 
{    
    LINE-HEIGHT: 200%
} 

A.smallerTag 
{    
    FONT-WEIGHT: normal;    
    FONT-SIZE: 105%
} 

A.mediumTag 
{
    FONT-SIZE: 115%
} 

A.largeTag 
{
    FONT-SIZE: 120%
} 

A.smallTag 
{
    FONT-SIZE: 110%
} 

A.smallestTag 
{
    FONT-WEIGHT: normal;    
    FONT-SIZE: 100%
} 

A.largerTag 
{
    FONT-SIZE: 130%
} 

A.largestTag 
{
    FONT-SIZE: 135%
}
/* end TagCloud styles */      


Finally, open the theme homeTemplate.blogtemplate file and modify the section that is currently displaying the Category listing to display a TagCloud instead. Here's how it looks in my theme after modifying the calmBlue theme:

<table class="MarginSection" width="100%" border="0" cellpadding="0" cellspacing="0">
    <tr><td class="MarginSectionHeading">Tags</td></tr>
    <tr><td class="MarginSectionBody">
        <%drawTagCloud()%>
    </td></tr>
</table>

If you would like a closer look at the code, here's a zip file (3.13 KB) of the work-in-progress theme as of 12/30/08.

 

Bookmark and Share  Comments [2] | Permalink | dasBlog

dasBlog provides an integration point with FeedBurner for syndicating and linking to your blog's RSS feed. Using FeedBurner to syndicate your blog has several advantages over using the local syndication service generated by dasBlog:

  1. As your subscriber count increases your site will not incur thousands of hits each day with blog reader software checking back for updated RSS posts.
  2. When users click to subscribe to your blog they see a standard FeedBurner page which makes it easy to subscribe by selecting from multiple options. This means you don't have to build individual links for BlogLines and other online reader services, and the subscribing experience is consistent regardless of what OS/browser is being used.

First step is to get setup with FeedBurner:

Next step is to configure dasBlog to display the FeedBurner link instead of the syndication service:

  • Open a local copy of the dasBlog \SiteConfig\site.config file in your favorite text editor and enter the feed name in the FeedBurnerName tag. Here's how it looks for this blog: <FeedBurnerName>MikeKnowles3</FeedBurnerName>    
  • Upload the config file to your site, and clear the browser cache and reload your main page.
  • The links to main blog feed will now use the FeedBurner link. Links to categories (tags) will still use the local syndication service links.
  • Within a theme, the FeedBurner link will be inserted every time you use the macro: <%feedLink%>  
Bookmark and Share  Comments [0] | Permalink | dasBlog
 

Yesterday I decided to move the site to a .NET hosting provider and get setup with a current blogging and content management platform.  After doing some plan comparisons I decided on GoDaddy. The Deluxe plan is only $6.99/month for a month-month deal (can cancel at any time) with no setup fee and includes .NET 2.0/3.5, IIS6, and 2 SQL Server 2005 databases. You can also connect to the SQL Server databases with SQL Management Studio Express running from your desktop and stored procedures etc. are supported.

Since I am going to continue to use Yahoo for the domain's email, I updated the Yahoo Premium Services DNS to point to the shared server IP address for the site running at GoDaddy. The GoDaddy account setup does not require that it owns the domain registration or DNS record - something to keep in mind if you want to try it out and not have to switch your DNS and email around. If I still like GoDaddy in a few months I may move email at that time (they provide 500 MB disk with webmail and spam filtering and more email addresses then I would ever need).

Next I installed dasBlog using the GoDaddy Application Installer. I was impressed that it completed the install including all filesystem and IIS configurations with no errors. Nice! If you haven't heard about dasBlog yet, it's worth checking out. It's an ASP.NET/C# blogging system. I decided to use it because it's written in ASP.NET/C# so I can tweak code as needed and also because Scott Hanselman works on the project and has used it to do some very cool things with his personal site.

Next I pulled down all the dasBlog files locally so I would have a mirror of the site to work against as I started to update files. Be sure you use an external ftp client when moving files up and down to GoDaddy, the Java ftp client they have runs in the browser and tends to crash on long-running jobs (they even tell you this on their site, so kudos to them for that).

Finally I spent a few hours today learning the config files and themes that ship with dasBlog. I started with the calmBlue theme and created my own and that's the theme in use on the site now. The theme is already setup to scale horizontally depending on the browser width. Here's the new theme directory:

The theme files are really easy to work with, they are basically just html fragments combined with scriptlet calls to macros. I removed some of the sections in homeTemplate.blogtemplate and tweaked fonts and other CSS styles in base.css to try and get it to have a clean somewhat-SharePoint-like look.

Bookmark and Share  Comments [0] | Permalink | dasBlog
Subscribe
Top 5 Posts
Add Google Analytics to a SharePoint Publishing Site
Integrating jQuery 1.3, ASP.NET 3.5 Visual Studio 2008
Add Custom Table Formats to SharePoint Content Editor
Configuring log4net for SharePoint Windows Authentication
Convert Visual Studio 2008 Class Library Project to Web Application Project
Tags
ASP.NET (5) dasBlog (5) GoogleAnalytics (2) jQuery (1) log4net (2) SharePoint (18) WebDesign (3)
 
 
 
Spreadfirefox Affiliate Button
 
Download Notepad++