DotNetKicks PlugIn for Windows Live Writer

    I've been using some javascript snippet that generates a DotNetKicks KickIt image for a blog post. I found the javascript to insert the KickIt link in a post by Jon Galloway. (Thanks Jon!) I tweaked his javascript to suit my needs and it works well. However, I rarely used my converted script because I was too lazy to copy it into my posts. I tried using the some of the Windows Liver Writer plugins that are available on CodePlex and other places, but none that I found did exactly what I wanted. So I decided to create a Windows Liver Writer plugin that inserts a KickIt link in my posts. It was pretty simple to throw together, and even though there probably is a better one out there already, I had fun doing this :)

    I used the SDK and threw together a plugin with a few properties in the sidebar pane (see below).  The buttons allow you to choose a color from a color dialog. One of the features I wanted was the ability to change the colors of the links, so the properties made sense for me.

    image      image

    It works now (as you can see the link at the bottom of this page), but once I get some more features in it I will make the bits available for download in case anyone wants it. I plan on putting in a better mechanism to manage default values, clan up some code I don't like, and customize a few other options. If you have any requests for features, leave me a comment or shoot me an email from my contact page.

    #1 DotNetKicks PlugIn for Windows Live Writer on 4.30.2008 at 2:29 AM

    You've been kicked (a good thing) - Trackback from DotNetKicks.com



    #2 Lars Corneliussen on 4.30.2008 at 5:35 AM

    Hi,

    i would really like to have the bits!!

    If you need me to help developing it - no problem either!

    Lars



    #3 Gavin Joyce on 4.30.2008 at 6:28 AM

    That's really nice, thanks for creating it. Would you be interested in adding the code to the DNK open-source project?



    #4 John Papa on 4.30.2008 at 9:24 AM

    At this point the code is pretty fresh but once I get it tested a bit more I will throw it up here. I'll certainly make it freely available.

    One issue I am working on is that I have to flip to HTML view and back to get the link to be visible. It may just be something with WLW and how it processes the jscript though.



    #5 Derek Lakin on 4.30.2008 at 9:37 AM

    No feature requests, just a request for the plug-in ;) I'm happy to beta test if you need any testers :)



    #6 Tyrone on 4.30.2008 at 10:36 AM

    John,

    I wrote the plugin listed on the Codeplex site. I'm intrested to see what you will come up with since I never really figured out how to generate the actual html for the image that DotNetKicks would provide you ONLY after you submit the story using their website. That was the main challenge I had with writing this plugin. As you may have seen, I basically had the users of the plugin to copy and paste the HTML code from DNK and I instered it into their post using my plugin. Not ideal, but this was all I could come up with.



    #7 John Papa on 4.30.2008 at 10:43 AM

    Tyrone,

    I started with the jscript generation technique that Jon Galloway (see the link in my post) wrote and then I tweaked it a bit. Basically, his idea was to use jscript to create the link request to DNK and return the item to a DIV (or span or some placeholder). The 2 problems I see are:

    1) Its all done client side so some readers are going to bark at this.

    2) If DNK changes how you interact (their interface) with the request, this may not work anymore.

    The problem I ran into is the same on you hit ... I could not get the image/link before actually kicking it using their web site. If there is a way to do that, then I would certainly jump on it. I know DNK is open, but I don't have the time to jump inside of that :)

    If you have any thoughts, feel free to share them.



    #8 John Papa on 4.30.2008 at 4:24 PM

    Gavin, I would be happy to add the code to the DNK open source project. Just shoot me an email and we can discuss specifics.



    #9 John Papa on 5.01.2008 at 12:13 AM

    One of the issues that I am batting around is how to dynamically grab the post's url in jscript. If the post is the page's url, its easy enough. But if the post is on a blog roll page that shows dozens of posts, the page url is not the post's url. So the jscript technique works when its on the post's page but not when its on another page.

    We could write code that is specific to each blogging engine to solve this, but that's not realistic IMO to expect to code for every blog engine.

    Another option is to have WLW grab the post url when it posts the post, then insert it into the script. However I do not believe WLW has access to the final destination since it does not generate it, the blog engine does.

    So the catch is finding a way to grab the current post's url that works in all blogging engines. If you have any ideas or alteratives, please chime in.



    #10 Lars Corneliussen on 5.15.2008 at 3:41 AM

    So will it be on DNK Open Source Project?



    #11 Windows Live Writer PlugIn for DotNetKicks Alpha on 6.03.2008 at 12:17 AM

    About a month ago I started writing a plug-in for Windows Live Writer that would insert a DotNetKicks link into the post . I got it working but I was not satisfied with the workarounds I had to use. The post url was not accessible prior to the post being



    #12 John Papa on 6.03.2008 at 3:33 PM

    Derek/Lars ...I just posted the bits on CodePlex. Check out this post: johnpapa.net/.../using-the-dotne



    #13 Busby SEO Test on 12.13.2008 at 3:08 AM

    nice post!i like it and i appreciate it