Adding COinS for BlogCFC

A few months ago, I was up at George Mason's Center for History and New Media talking to them about how they were approaching their online projects. One of the things they introduced me to was Zotero, a Firefox extension to "collect, manage, and cite your research sources." While it was mostly developed to help researchers manage citations online, I started using it to start organize blog entries, adding my own notes, tags, and relating them to other blog entries.

Unfortunately, I've been adding these pages manually. And, with about two lines of code, you can add meta-data to not only open your entries in BlogCFC up to Zotero, but other harvesters.

First, a quick note about COinS.

COinS is an acronymn for ContextObjects in Spans), it's basically a micro-format for embedding bibliographic information in HTML for the NISO OpenURL Standard Z39.88-2004. What makes this really nice is that you no longer have to hunt down how to cite information for your specific format (Chicago, APA, etc.), the information is embedded in the HTML and software then properly formats the citations for you.

A blog entry is a reasonably straight-forward citation. You want the URL, title of the entry, the author, and date. So, to add to BlogCFC, open the index.cfm page and where the loop for the categories is located (around line 82), simply add a new String of the categories:

<cfloop item="catid" collection="#categories#">
      <!--- added line --->
      <cfset cats = cats & "&amp;rft.subject=" & #categories[currentRow][catid]# />
      
      <cfoutput><a href="#application.blog.makeCategoryLink(catid)#">#categories[currentRow][catid]#</a><cfif catid is not lastid>,</cfif></cfoutput>
   </cfloop>

Now, you just need to add the span. I added mine directly under the close of the above loop.

<cfoutput>
   <span class="Z3988" title=""ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Adc&amp;rfr_id=info%3Asid%2Focoins.info%3Agenerator&amp;rft.title=#replace(title, " ", "+", "ALL")##cats#&amp;rft.creator=#application.blog.getProperty("owneremail")#&amp;rft.date=#dateFormat(posted, "yyyy-mm-dd")#&amp;rft.type=blogPost&amp;rft.format=text&amp;rft.identifier=#application.blog.makeLink(id)#&amp;rft.source=#application.blog.getProperty("blogDescription")#&amp;rft.language=English"></span>
</cfoutput>

You'll notice there's nothing in the span, so it doesn't actually display on the screen, but is there for OpenURL aware programs like Zotero. If you refresh your cache, you'll then see a button in the address bar (assuming Zotero is installed) that will then add the blog entry to your collection.

Not using BlogCFC? There's a few WordPress plugins too, though I've not seen anything for Blogger yet.

Atom for BlogCFC

There are a lot of different formats for generating syndicated content (RSS 1 and 2, OPML, Atom, etc.). Currently (as of 2005), there are two big players, RSS 2.0 and Atom 1.0. One of the downfalls of the RSS 2.0 standard is that it is copyrighted by Harvard University, and work on the specificiation has halted. Because of this, future work has to be carried out under a different name (and organization). The Atompub Working Group is one organization carrying out further development of online syndication with the Atom 1.0 standard.

Without getting too far into the differences between the two, I thought one of the coolest things about Atom is that it is capable of being transferred using any network protocol (like XMPP). Atom is also an XML namespace, along with using a non-normative RelaxNG schema.

Anyway, I extended this blog (BlogCFC) to generate an Atom feed (including the RSS 1.0 and RSS 2.0 feeds it already generated). The code isn't quite ready to post yet, but I basically created a new file named atom.cfm, which is almost exactly like rss.cfm, but calls a new function in blog.cfc called generateAtom.

The generateAtom function creates the Atom XML, and includes a stylesheet from the AtomEnabled.org site. Because Atom uses the xhtml namespace, it actually uses your browser's default HTML stylesheet rather than the XML stylesheet with the tree view.

I have validated the feed against FEED Validator, though the enclosures and subjects aren't currently in there...but will be added shortly.

Google Blog Search

Like many, I've been playing around with Google's blog search today. From a university library perspective, it's interesting to see what people are saying about the library. While playing around with the searches, I noticed the little Live Bookmark in Firefox that allows you to subscribe to a search. Very cool!

This got me thinking more about how our library catalog is being used. It would be really nice to be able to generate RSS from search results in the library catalog. It would be nice to be able to set up searches in the catalog that monitor specific resources in the catalog. Since I'm thinking out loud, this could probably be done reasonably easily with an asynchronous gateway using the Z39.50 protocol...hmmm; sounds like a project!

Updated BlogCFC_auraskin

In moving our website this weekend, I made the update to Ray Camden's BlogCFC 3.9 for our blogs. We had been using Joe Rinehart's BlogCFC_auraskin, but it looked like the code hadn't been updated in a while.

I spent a little bit this morning reworking the changes to BlogCFC since March the Aura skin which is available here.

As with Joe's original, this is licensed under the Creative Commons Attribution-ShareAlike License 1.0 (based on the original AuraSkin by Leorex). Also, by downloading the software, you do not hold myself, Joe, or Ray liable for anything that could occur related to this code.

Blogs and Technocrati

I just finished adding the code to enable this blog to automatically ping Technorati when there is an update using Ray Camden's CFCBlog. Steven Erat wrote a short how-to on his blog.

Next up...pinging to ping-o-matic that updates a bunch of aggregator services (Weblogs.com, Blogdigger, Syndic8 to name a few). Once I get the code finished, I'll post it up.