Since becoming the first COinS-PMH (now unAPI)-compliant blog in the world, I’ve been meaning to flesh the plugin out a bit before releasing it; but I haven’t had time. So here’s the Wordpress Simple OAI plugin. To install it: unzip it into the wp-content/plugins directory (so you get a directory called oai there). Then, add this code snippet to post.php and single.php in your current theme, under the posting title:
<span
class="Z3988 pmh"
title="ctx_ver=Z39.88-2004
&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Adc
&rfr_id=info%3Asid%2Fwallandbinkley.com%3Agenerator
&rft.identifier=oai:wallandbinkley.com:quaedam:<?php echo the_ID(); ?>
&rft.title=<?php echo urlencode(the_title('', '', FALSE));?>">.</span>
I’ve broken the title attribute into several lines for readability, but you should be sure to combine it into a single line; and note that its ampersands should be presented as entities. Replace “wallandbinkley.com” and “quaedam” with your own domain and blog names.
In the head of these two files, add this (modifying the url as appropriate):
<link rel="meta" type="application/xml" title="COinS-PMH" href="http://www.wallandbinkley.com/quaedam/wp-content/plugins/oai/wp-oai-simple.php?" />
Finally, insert this into your style.css:
.pmh {display: none;}
Now install Dan Chudnov’s GreaseMonkey script, if you haven’t already, and visit your blog. You should see something like this screenshot.



Creative Commons License
[...] So, does that mean I can do XYZ that I’ve wanted to do? Maybe. Anybody who knows how to write a WordPress plugin can take a stab at playing with all that data. The “refine search” content in the right column, and the “alternate searches” content at the bottom is generated that way. Try this one: I’ve finally got the Wikipedia results I’ve always wanted in the catalog, just look in the right column. Or take a look at the “add to del.icio.us” link in the record display, that’s generated by a regular wordpress plugin written by Arne Brachhold, who wasn’t thinking of libraries or OPACs when he wrote it. And down at the bottom of the page you’ll see the a list of related works that’s built by my own bsuite plugin. Want COinS-PMH/unAPI? The interface and all the data are there to make it happen, and here’s a good plugin to start from. [...]
2006
WPopac: An OPAC 2.0 Testbed « MaisonBisson.com