COinS-PMH (unAPI) WordPress Plugin « Quædam cuiusdam
COinS-PMH (unAPI) WordPress Plugin
Friday 9 December 2005 @ 8:03 am

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:

class="Z3988 pmh"
&amp;<?php echo the_ID(); ?>
&amp;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 “” 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="" />

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.

Warning: Creating default object from empty value in /home/wandb/ on line 1056

 One response to “COinS-PMH (unAPI) WordPress Plugin”

  •   lil wyte wrote:


    I installed WordPress on my server, and set up a site. It’s a relly nice piece of software. However, I am missing a piece of functionality, and

    couldn’t find a suitable answer for it. Mayou you know a plugin I could use?I need to automatically inserts ads in my posts.And not AdSense ads, but rather HTML snippets defined by me (affiliate links, etc). Let’s say I would insert a tag in my post:
    — ad here —
    and the plugin would automatically replace it with some HTML code, when the post is displayed on my site.I really don’t need any fancy configuration options etc, just the basic replace functionality.
    Do you know a plugin that can handle this?

Leave a comment