I was looking around for some method of easily adding an DotNetKicks button to my posts but couldn't find anything anywhere. What did I do? Good developer that I am I downloaded the Blogengine.NET source and whipped up a quick extension! I only browsed around for as long as it took for me to find what I needed but I must say that the code was really well organised and readable, there is a post on the project's wiki about creating extensions and it really was a breeze.
My extension checks the post's content for an occurance of the token "[ dotnetkicks ]" (without the spaces!) when it is saved or updated and replaces it with the friendly green button. The code really just boils down to the following:
post.Content = post.Content.Replace(dotnetkicksToken, kickItButton);
There is one class in the attached zip, DotNetKicks.cs, this needs only be uploaded to your ~/App_Code/Extensions folder and everything magically works.
Update
In response to a comment asking about generating the correct HTML for a button when the article is not yet on DotNetKicks, here is the code to do just that! DotNetKicks works in such a way that if a button is created using a URL which it doesn't know, the "kick it" button will show 0. When the button is clicked for the first time you will be taken to the DotNetKicks submission form and just have to fill in the title and description. When you hit submit and them come back to your post, "kick it 1"! Pretty smooth..
String kickItButton = String.Format(
@"<a href=""http://www.dotnetkicks.com/kick/?url={0}"">
<img src=""http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url={0}""
border=""0"" alt=""kick it on DotNetKicks.com"" />
</a>", post.AbsoluteLink);
Update 2
Changed the code as per Chris Blankenship's comment to include the title, saves you filling it in yourself...
DotNetKicks.zip (681.00 bytes)
<--- Look, it works...