Building a better SharePoint blog 

Tags:

I've been spending some spare time improving the OOTB blog site in SharePoint 2007 (WSS 3.0).
 
Here's what I got working so far on our development server:
  1. Trackback support.  Send or receive trackback "pings" with your SharePoint blog.
  2. Assign multiple categories to a post (this is too easy to do.. why wasn't it this way OOTB??).
  3. Links at the bottom of each blog post to add the post to del.icio.us, favorites.live.com, digg.com and reddit.com.

At the risk of this blowing up in my face, I've decided to be bold and give you a direct link to a test site on our development server: Enhanced SharePoint Blog.  I make changes directly on the server and perform iisreset all the time, so it may be off and on or it may be broken while I'm working on something new.

I might divulge more nitty gritty details later, but for now I'll just quickly go over what I did to get these "features" working, except I'll let you figure out how to implement "many to one" category assignment.

For trackback support:

  • I have an aspx page in the _layouts directory that acts as a trackback ping receiver (see the trackback spec).  By using a querystring parameter for the Post ID, the single aspx file meets the spec requirements for a unique trackback ping URL for each and every post.  If you HTTP POST the aspx "page" with the proper variables, it will register the received trackback ping in a custom list and deliver the appropriate XML success response back to the pinger.
  • Each post shows a count of the trackbacks it received along with a link to view the details.  I used the OOTB "count related" capability of the lookup column to create a "# Trackbacks Received" field, and then I have another computed column that uses a simple CAML DisplayPattern to show the first column within a hyperlink to a filtered view of the received trackbacks list.  (I see how that might sound complicated, but really it's not...).
  • A special computed column renders (invisible) XML RDF meta tags in the post's HTML to expose the trackback ping URL.  There is also a computed column linking to a simple aspx page that lets you grab the trackback ping URL when you're blogging platform doesn't support the ping URL auto-discovery (nothing I've found seems to support this part of the spec, except for Movable Type, the spec's creators.  Even I didn't bother implementing auto-discovery yet since no blogs expose the required metadata anyways).
  • Another list stores "outbound" links (trackback or not).  Another computed field renders a hyperlink to add an outbound link for a particular post.  The hyperlink includes a querystring parameter rigged to some JavaScript on the NewForm.aspx page in order to preselect the post ID based on where you clicked the hyperlink.  I have yet to create a simple event receiver to parse through the post body text and extract all external hyperlinks.  So for now, performing a trackback ping is a manual operation.
  • When you add an outbound link, an event receiver will perform a trackback ping to the other person's blog if you specified a trackback ping address.  Again, I didn't implement the auto-discovery part of the spec so you have to specify a trackback web address in addition to the permalink (but show me a popular blog implementation that actually exposes the required metadata and I'll do it).  Note (May 8, 2007): I have since discovered that many blogging applications will look for a <link> tag that specifies what the URL is for sending trackback pings.

For the del.icio.us and other links:

  • These are just computed fields with a custom DisplayPattern to output the HTML for the necessary hyperlinks.  Note: there's a big difference between "Calculated" and "Computed" fields.  Since each of these fields pretty much has the exact same CAML markup, perhaps one day I'll create a custom field type so that I don't have so much ugly copy-and-paste in my site definition.  Better yet, this would let you add your own "URL action"-type fields (i.e., read-only hyperlinks with certain variables in them like item URL and Title).

I made all of these changes directly in site definition files.  The SharePoint feature framework doesn't make it easy to do the things I needed.  With features, you cannot add a column to an existing list definition/schema.  You also cannot modify the existing views specified in the list definition to show these fields.  I suppose your feature could add site columns and then a .NET feature receiver assembly could tack the columns onto the necessary list and views, but this just seemed like too much effort to be worth it.  Also, not only would development be slowed down but the site itself would be slower due to schema differences being loaded from the database and merged with the site definition.

Perhaps another approach would be to create a content type feature that duplicates the OOTB fields in the Posts list and then adds in the custom columns.  You would then have another feature bind the first feature to the Posts list as the default content type.  But after all that effort, I'm not even 100% sure this would work.  And I'd still have to do something about getting the new fields into the views.

Finally, here's a quick list of further enhancements I'm planning for SharePoint blogs:

  1. Pingback support: another "Linkback" standard in addition to Trackback
  2. Using the Content Query Web Part to aggregate blogs in subsites.  I started this at http://home.infusionblogs.com, but I need to make the links work for anonymous users and use a custom XSLT to display more information like the name of the blogger.
  3. Adding shortcut links as part of the new blog site definition.  These shortcuts would allow you to easily subscribe to e-mail alert notifications for posts, comments and trackback (as well as any other handy shortcuts I can think of).
  4. Providing the ability to rate each blog entry.  Right now I'm thinking of tying the Posts list to a custom survey.
  5. Finding out why the Google "Subscribe" bookmarklet doesn't work, and then fixing the issue.

I'm also very open to suggestions for how to make SharePoint blogs that much better.  By the way, who thinks I should distribute the site definition when I'm done?

 
Posted by Nadeem Mitha on 29-Jan-07
5 Comments  |  Trackback Url  |  Link to this post | Bookmark this post with:        
 

Links to this post

Comments


commented on Tuesday, 20-Jan-2009


commented on Wednesday, 23-Sep-2009


Daddy64 commented on Thursday, 22-Oct-2009
But cli- mate change will also affect global ecology. ,


Tyres Dealer commented on Friday, 13-Nov-2009
Whenever, i saw your blog really i knew Building a better SharePoint blog related new information.


Iran, Berlin commented on Wednesday, 25-Nov-2009
This is a cool site! Thanks and wish you better luck! Brilliant but simple idea.: URLsWithURL

Name:
URL:
Email:
Comments: