rss

Adding Microsoft social bookmark shortcut to Graffiti CMS posts

Microsoft Social Bookmarking is still in preview release, but I'm ready to drink the blue kool-aid and give it a shot. Here's how you can add a link to your Graffiti CMS posts (like the one at the bottom of this post).  sbmicrosoft

I couldn't find details on the url structure, but the browser button script looks like this:

javascript:s=document.selection.createRange().text.replace(/%20{2,}/g,'%20').replace(/^%20|%20$/g,'');d='';if(s!=''){d=encodeURIComponent(s);};window.location('http://social.microsoft.com/bookmarks/en-US/action/Create/s/E/?url='+encodeURIComponent(location.href)+'&ttl='+encodeURIComponent(document.title||'')+'&d='+d+'&bm=true');;

 

So, with no spaces or special chars, "d", this url should work:

http://social.microsoft.com/bookmarks/en-US/action/Create/s/E/?url='http://bilinski.org/post/'&ttl='Title'&d=''&bm='true'

 

Add lines like this to your post.view file:

<div id="sbmicrosoft">
<a href="http://social.microsoft.com/bookmarks/en-US/action/Create/s/E/?url=http://bilinski.org$post.Url&ttl=$post.Title&d=&bm=true">
<img src="/files/media/image/spacer.gif" alt="Bookmark on Microsoft" />
</a>
</div>

 

 

...and you could add something like this to default.css:

#sbookmarkbar #sbmicrosoft img {
  background : url(images/sbmicrosoft.png) no-repeat;
border-style : None;
height : 24px;
width : 24px;
}

Bookmark


TrackBack URL: http://bilinski.org/trackback.ashx?id=29

#1 Chris Slemp on 7.22.2008 at 11:53 AM  avatar

Jamie, I'm thrilled to see someone excited enough to take this initiative! I actually did a post a couple weeks ago using beta code from our dev team. blogs.msdn.com/.../bookmarking-wid

We'll be releasing an "official" widget next month when we move out of preview. We're also working on a more robust API. Subscribe to my blog to keep posted on developments.

#2 Italian Translation on 8.08.2009 at 5:38 AM  avatar

Thanks mate!I was looking for that info for nearly 2 days!Graffiti is the best CMS ever.

#3 Computer Terms on 9.03.2009 at 5:48 PM  avatar

Thanks for this nice info, it's so useful for me.

#4 Italian to English translation on 4.27.2010 at 5:01 AM  avatar

That's a very useful piece of code.

Leave a Comment

 

 (optional/private)

(optional/public)