Quantcast
Channel: Alun | AlunSalt
Viewing all articles
Browse latest Browse all 20

DOI wrangling for WordPress

$
0
0
Here's a preview of the panel.

This post is a test, but it might also be an announcement. A while back I was working on a plugin that, among other things, added DOI information to a post. It’s handy if you’re using something like ScienceSeeker used to be though not quite enough for ResearchBlogging.

Work stalled for a few reasons. One is that I’d tried doing too much with it. Astronomers would want arXiv and historians would find ISBNs useful. The other was formatting the citations in a reliable way. Things would break down.

I now have a new version of the plug in. It only works with self-hosted (WordPress.org) WordPress installations, and only with DOIs, because at the moment that’s all I need. So it doesn’t do a lot, but I’m hoping what it does it’ll do without breaking down often or causing too much strain on the servers.

Here's a preview of the panel.

Here’s a preview of the panel.

So you enter DOIs in one format or another, then when you save the draft, if the citation area is blank, WordPress will attempt to fill that area with the right code with COinS and some formatting. You now have DOIs and a formatted citation ready for use in the blog post

The feature I like is the Autofill option. This is set to off as a default, but flip it on and it should scour the entry for links to papers like this one, pull them out, format them and so on.

What I hope is that it will help tracking of connections to papers for companies like Altmetric and ImpactStory. If you right-click and view source then somewhere in the top of the document you’ll find:
<meta name="citation_doi" content="http://dx.doi.org/10.1093/aob/mcv182">

The advantage of this version of the plug-in over previous iterations of the code is that this should be able to handle links to multiple papers, because not every post is about just one paper. I’ve added a link to a second paper and when you find that first meta tag for a citation doi, you’ll find a second underneath it.

The Autofill actually found three links because that doi in the code also looks like a URL, but it’s easy enough to edit it out.

It’s not just for altmetrics though. The same DOIs should be formatted as full bibliographic entries as the bottom of this post. There are altmetric buttons to go with them, because they might be useful in tracking down comments about the papers elsewhere.

This is pretty much the final stage of alpha testing. If it works here I’ll try it live on AoB Blog and, when I’ve sorted that out, I’ll make the code available here for people to pull apart and see if there are any major security holes.

References

Yanfang Xue, Haiyong Xia, Peter Christie, Zheng Zhang, Long Li, Caixian Tang, 2016, 'Crop acquisition of phosphorus, iron and zinc from soil in cereal/legume intercropping systems: a critical review', Annals of Botany, vol. 117, no. 3, pp. 363-377 http://dx.doi.org/10.1093/aob/mcv182

Philip J. White, 2015, 'Selenium accumulation by plants', Annals of Botany, p. mcv180 http://dx.doi.org/10.1093/aob/mcv180


Viewing all articles
Browse latest Browse all 20

Latest Images

Trending Articles





Latest Images