PubMan Wordpress Plugin

From MPDLMediaWiki
Jump to navigation Jump to search

The Wordpress Plugin for fetching content from eSciDoc works via the Search&Export REST interface.

PubMan Content Plugin[edit]

  • Contributors: Andreas Gros,, Friederike Kleinfercher
  • Tags: rest, publication
  • Versions
    • 1.0 (for wp 2.6 - wp 2,9)
    • 2.0 (wp 3.3)

This Wordpress plugin enables you to fetch publication data from PubMan via the Search&Export REST interface.


This Wordpress plugin enables you to fetch publication data from PubMan via the Search&Export REST interface of eSciDoc PubMan ( The plugin depends on a web server with the DOM module enabled for parsing XML and on curl for parsing HTML header information. This version of the plugin allows to pull automatic updates of existing publication items and also to automatically import new items. These can be imported als "draft" posts or as "publish"-ed posts.

Alternative Representations[edit]


The plugin also creates RDF representations for the blog posts and it adds a link to the RDF representation to the HTML document head of the post's page and creates RDF descriptions also for the blog categories.


During the import of PubMan items into Wordpress this plugin creates also representations of PubMan entries in OAI-DC, MODS, and MARCXML (the latter two are still rather experimental). The MODS format is readily accepted by Zotero. These formats can be served by a unAPI server (the one running on is an adapted version of the unapi-server-wordpress plugin written by Peter Binkley and Michael J. Giarlo (;

You can find a link to the version of the unAPI-server Wordpress plugin adapted for PubMan entries below under Download.

Accessing the REST interface of PubMan[edit]

You can get user-friendly access to the REST interface here:

The plugin transforms the "snippet" output of

into a publication list and returns this list back to Wordpress.


You can put the following line (an inline plugin call) into your page or post to fetch a list of publication items from PubMan to be displayed in a single post or page, or you can use the "user settings" described below to automatically create one blog post for each publication item fetched from PubMan according to category/subject terms:

[pubman-content searchstring='MySearchString' citationstyle="APA"]

Examples for searchstrings:

  • escidoc.metadata=sengbusch
  • escidoc.any-persons=sengbusch AND escidoc.publication.subject=fish
  • escidoc.any-persons=sengbusch AND escidoc.publication.subject="Kidney stones"

Please note that for terms that include spaces you need quotes. These only work if you put the searchstring in single quotes: searchstring='escidoc.any-persons=sengbusch AND escidoc.publication.subject="Kidney stones"'

For a list of possible escidoc-terms, e.g. escidoc.any-persons, etc., please visit:

You can limit the output by setting offset ("startRecord") and the number of records to be returned ("maximumRecords") in the search query:

The total number of records in PubMan that matches the search query is returned in the HTTP header as x-total-number-of-records, e.g. :
x-total-number-of-records: 307

The plugin parses the HTTP header and reads out this number. This is necessary for paging search results returned for search queries issued by "inline plugin calls" for which search results have to be displayed within a single post/page without creating actual blog posts, but still need to be readable (i.e. paged or attributed with a "read more ..." link).


Version 1.0[edit]

Check out the latest version of the PubMan Content Wordpress plugin via subversion:

svn checkout

Check out the corresponding unapi-server Wordpress plugin

svn checkout

Check out a Wordpress theme that incorporates both the PubMan content plugin output and the unAPI features:

svn checkout

Version 2.0[edit]


  1. Copy the pubman directory into the /wp-content/plugins/ directory
  2. Activate the plugin through the 'Plugins' menu in WordPress
  3. Place [pubman-content searchstring='MySearchString' citationstyle="APA"] in your posts or pages or use the site admin pages of the plugin to configure it for more advanced usage.
  4. make sure curl is enabled in your php.ini


Inside Wordpress's site-admin area[edit]

Admin settings[edit]

Go to "Settings" and "PubMan Content Plugin Config" and put in the following parameters:

  1. Base-URL, e.g.
  2. Path to full item view in PubMan, e.g. /pubman/item/
  3. Path to the Search&Export interface in PubMan, e.g. /search/SearchAndExport
  4. Default text for the link to the full item view, e.g. [LINK]
  5. Default search string
  6. Default sort key, e.g. sort.escidoc.publication.issued,,0, which sorts by "date issued" (descending). You can find a list of possible search terms here (search for "sortKeyword").
  7. Default number of items per page (for the paginator on pages/posts with a shortcode call (like [pubman-content searchstring='escidoc.any-persons=sengbusch' citationstyle="APA"])
  8. Default citation style
  9. Update checking interval
  10. Whether or not to create posts from PubMan automatically ("yes" or "no")
  11. Default status of automatically created blog posts ("draft" or "publish")
  12. Whether or not to create blog categories from PubMan subject terms automatically ("yes" or "no")
  13. Whether or not to update blog posts automatically if the PubMan item was changed ("yes" or "no")
  14. Whether or not to import only PubMan items with a publicly available fulltext ("yes" or "no")
  15. Whether or not to import only PubMan items with a fulltext with a CreativeCommons license ("yes" or "no")
  16. Whether or not to display a CreativeCommons license button if possible ("yes" or "no")

Currently the plugin uses "Default search string" to assemble a cql search request for the Search & Export interface of PubMan. This can be used to -- for example -- find all publications of a certain organizational unit (an institute/working group) in PubMan:

  • to get results for an organizational unit: escidoc.any-organization-pids=escidoc:44071
  • to retrieve publication items from a PubMan context:"escidoc:37020"

User settings[edit]

In Wordpress versions < 2.7 go to "Manage" and "PubMan Content User Options"; in more recent Wordpress releases go to "Posts" and "PubMan Content User Options".

On this page you find all subject terms of PubMan items that are found by using the search terms specified in "Admin settings" above. It uses "Default search string" (see above) to assemble a cql search string and fetch items from PubMan's Search & Export interface.

The plugin checks which of the subject terms have already been put in the blog as "Categories" and shows those as "checked" items in a list of all subject terms found.

The plugin collects the PubMan items according to "Default search string" and checks whether or not these have already been published (grey numbers), imported as draft (blue numbers) or not imported at all (red numbers).

By clicking on "Save changes"

  • checked category names (PubMan item's subject terms) that do not exist as blog categories yet will be created
  • items in checked categories that exist as "draft" blog posts will be published
  • items in checked categories which are not yet in WP will be imported either as "draft" or as "publish"-ed posts, depending on your setting of "Default status of automatically created blog posts"
  • existing blog posts in the checked categories of PubMan items will be updated if necessary (i.e. a publication item was updated in PubMan).

You can force an update of all blog posts by ticking the check-box at "Force update" below the list of subject terms. The option "Show a report about the actions taken" will put out some debugging information about the actions taken by the plugin.


  1. The screenshot scrnshot1.png shows the output of the plugin in Wordpress.
  2. The screenshot scrnshot2.png shows the current admin interface of the plugin in Wordpress
  3. The screenshot scrnshot3.png shows the current user interface of the plugin in Wordpress
  4. The screenshot scrnshot4.png shows the dashboard notification of the plugin in Wordpress (works only with version > 2.7)

Open Issues v2.0[edit]

  1. Display of CCLicense is broken
  2. Display of article title in a post does not work