Grails Social Bookmark Plugin


The problem with social bookmarks is that they oscillate between a desire to inform and neediness. Imagine the blogosphere is a giant supermarket, like a Kroger, Carrefour, or Sainsbury’s*. In the produce section, you have your time sensitive stuff like the news, walk over to the candy aisle and you have the jokes, NSFW, and fluff. Over in the junk food aisle, you have all the stuff that is gratifying for a fleeting moment, like Ruby is sooooo awesome!!!!, Java sucks!!!!, PHP is so l33t, etc.  

People can’t be expected to wander through the aisles to find your blog nestled in with organic peanut butter. The properly used social bookmark link can get you one of those coveted checkout counter slots for a short time, in the hopes that when your time as a featured product is over, folks will come to your aisle and look for you. Put fifteen links and submit every post to every engine yourself and you will look just like the trash mags.

To that end, the most recent addition to my blog is to add social bookmarking links. So that the effort doesn’t have to been duplicated among the other Grails Blog Software efforts, I’m releasing the functionality as a plugin. There are seven links built in, as you can see at the bottom of this entry. Feel free to modify the taglib to add your own favorites. The three options are text only, image only, or both. The format is basically this:

 <g:bookmark title="${entry.title} permalink="${entry.permalink}" type="image"/>



Run the plugin as a regular Grails app and you will see more taglib specifics on the index.gsp page.

Download: grails-social-bookmarks-0.1.zip

I went back and refactored the taglib to use addtoany.com since they have support for a lot of services and their widget is nice and AJAX-y.

Add this taglib to your application: BookmarkTagLib.groovy

* larger supermarket chains in America, France, and England respectively



12 Dec, 2007
Share/Save/Bookmark


Related Posts:
Motivation comes when you least expect it - Google Chart Plugin
A couple days with Grails
Google hosting AJAX libraries on their infrastructure
Response to Java vs Ruby


Comments

Leave a comment