WordPress.org

Ready to get started?Download WordPress

Plugin Directory

Mendeley Plugin

Mendeley Plugin for WordPress is a plugin for displaying information from the Mendeley "shared bibliography system" in WordPress blogs.

Mendeley Plugin for WordPress is a plugin for displaying information from the Mendeley "shared bibliography system" (www.mendeley.com) in WordPress blogs.

Using the public API from Mendeley, meta-information on documents in personal, public or shared collections is loaded and formatted as bibliographic entries.

The lists can be included in posts or pages using WordPress shortcodes:

[mendeley type="folders" id="xxx" groupby="xxx"]
[mendeley type="groups" id="xxx" groupby="xxx"]
[mendeley type="groups" id="xxx" sortby="xxx" sortbyorder="xxx"]
[mendeley type="groups" id="xxx" groupby="xxx"]
[mendeley type="groups" id="xxx" groupby="xxx" filter="author=Michael Koch"]
[mendeley type="groups" id="xxx" groupby="xxx" filter="author=Michael Koch;type=Book Section"]
[mendeley type="documents" id="authored" groupby="year"]
[mendeley type="documents" id="authored" filter="tag=perceptualorganization"]
[mendeley type="documents" id="authored" sortby="authors" sortbyorder="asc" groupby="year" grouporder="desc"%#93;
[mendeley type="own"%#93;
[mendeley type="groups" id="xxx" groupby="xxx" csl="http://DOMAINNAME/csl/custom_style.csl"]

- the attribute "type" can be set to "own", "folders", "groups", "documents"
- the attribute "groupby" is optional; possible values currently are: "authors", "year"
- the attribute "sortby" is optional; possible values currently are: "authors", "year"
- the attributes "sortbyorder" and "groupbyorder" can have the values "asc" and "desc"
- sorting on the sort key is done before grouping on the group key if both are provided
- in "filter" one or more equal matches can be filtered for; if more than one filter rule is specified, than documents are displayed only when all filter rules match
- possible attributes to filter for are: author, editor, title, year, tag, keyword, url, publication_outlet, pages, issue, volume, city, publisher, abstract (when filtering for tag or keyword, a substring search is performed, so "blog" also matches "microblog")
- the attribute "csl" is optional; the value must contain a valid URL with a .csl file

If you do not specify a CSL stylesheet, full entries are formatted the following way - so, the style can be tailored using CSS.

    <h2 class="wpmgrouptitle">grouptitle</h2>
    <p class="wpmref">
       <span class="wpmauthors">$authors&lt/span>
       <span class="wpmyear">($year)</span>: 
       <span class="wpmtitle">$title</span>
       , <span class="wpmoutlet">$publication_outlet</span>
       <span class="wpmvolume">$volume</span><span class="wpmissue">($issue)</span>
       , <span class="wpmeditors">$editors</span>
       , <span class="wpmpages">$pages</span>
       , <span class="wpmpublisher">$city: $publisher</span>
       , <span class="wpmurl"><a target="_blank" href="$url"><span class="wpmurl$urltxt">$urltxt<>/span</a&gt</span>
    </p>
  • urltxt is per default "url" or "pdf", "ps", "zip" if this is the extension of the file referenced by the url

By adding some lines in your style sheets, you can format the output according to your needs. One example:

.wpmref {
}

.wpmauthors {
color: #666666;
}
.wpmyear:after{
content: ": ";
}
.wpmyear {
color: #666666;
}
.wpmtitle:before{
content: "\"";
}
.wpmtitle:after{
content: "\"";
}

.wpmurlpdf:before {
content: url("/image/pdf.gif");
}

.wpmoutlet,
.wpmvolume,
.wpmissue,
.wpmpages {
font-style: italic;
color: #336633;
}

Additionally, there are widgets to display the content of collections or shared collections in widget areas of a theme (list of titles with links only). The output in the widgets is formatted the following way:

    <ul class="wpmlist">
    <li class="wpmlistref">
    title (if url is defined, then this title is linked to url)
    </li>
    ...
    </ul>

The title will additionally be equipped with a div-tag including the full reference in the title attribute - which will in most browsers display the full reference when you are hoovering over the title with the mouse pointer.

You can use the plugin in non widgetized themes, just try

echo $mendeleyPlugin->formatWidget("groups", 763, 10, array ('author' => 'Michael Koch'));

For using the plugin you have to obtain an API key from Mendeley, enter this Customer Key in the configuration section of the plugin, and authorize the API. To do so the following steps have to be taken:

  1. install plugin
  2. activate plugin
  3. get Customer Key and Customer Secret from http://dev.mendeley.com/
  4. enter the information in the wp-mendeley tab in the backend
  5. press "Get Access Key" on the wp-mendeley configuration page
  6. then you are redirected to the Mendeley web site to authorize the request, and redirected back to the blog
  7. now you can use shortcodes in your pages and blogs

Details presentation

The document lists in the widgets only include the title of the document and a link. Per default the link is either the url attribute of the document - or if not set a link to the doi attribute in the document if set.

To present more details for those list entries without leaving the web site beginning in version 0.8.1 you have two options:

1) if enabled in the configuration, the list items will include mouseover tooltips showing the full reference - this can be constructed in a simple default way or using CSL stylesheets.

2) if a details url is set in the configuration, all list items are linked to $DETAILSURL?docid=XXXX You can create a details page on your WordPress installation in the following way: - create a page - insert the [mendeleydetails]...[/mendeleydetails] shortcode in the page - the text between the shortcodes is interpreted the following way: every tag "{attributename}" is replaced by the corresponding attribute in the Mendeley document - if you only use the simple shortcode [mendeleydetails] then the plugin looks for the file "mendeley-details-template.tpl" in the plugin directory and interprets the content of this file in the same way

In addition to all attributes returned from Mendeley (abstract, authors, doi, editors, translators, categories, identifiers, issue, keywords, mendeley_url, pages, producers, publication_outlet, published_in, tags, title, type, url, uuid, volume, year - also see the Mendeley API documentation at http://apidocs.mendeley.com/home/public-resources/search-details) you can use the special attribute "full_reference" to insert a full reference. The attribute can be annotated with a CSL url to do the formatting according to a CSL stylesheet: {full_reference,http://site/url.csl}

JSON data source

In version 0.7 we added the functionality to create a JSON data source - e.g. to be used as data source in Exhibit/Simile application.

For example the page http://www.kooperationssysteme.de/pub/cscm/ uses such a data source in an interactive JavaScript application to search the references.

The following line is used in the Exhibit/Simile application:

In the directory examples you find a file bibexhibit.tpl.php that can be placed in your WordPress theme directory. Then you can create a new page with the Template BibExhibit that will show the application with the data source.

CSL integration

When you specify a CSL (citation style language) stylesheet via the csl parameter, the formatting specified in the stylesheet is used to generate details.

A .csl file must be a XML formatted file, containing the style tags defined by the citation Style language. For further information of CSL you should visit the citationstyles.org website. If you want to use an existing CSL style, you should browse the zotero style repository on zotero.org/styles. For creating your own CSL file, you can either write an XML-file or use a visual editor e.g. editor.citationstyles.org/visualEditor/.

We include some CSL files in the sub directory "style" - So, an easy way to try the functionality could be to link to one of those files - e.g. by an URL like the following: http://YOURDOMAIN/wp-content/plugins/mendeleyplugin/style/apa.csl

For formatting entries via CLS, we are relying on the CiteProc.php formatting engine by Ron Jerome, which usually is included in the plugins distribution. (See https://bitbucket.org/rjerome/citeproc-php for the original project.)

The library includes locale-files for adapting the output to different languages. We have only included the DE and EN locales here. Please load additional locales from https://bitbucket.org/rjerome/citeproc-php/src/ and add them in the locale folder in the plugin folder.

Thanks ...

Thanks for contributions to Rhodri Cusack and Matthias Budde.

Thanks for contributing to the CSL integration in V0.8 to Philipp Plagemann, Claudia Armbruster and Martin Wandtke. Thanks for contributing to the details display in V0.8.1 to Björn Trappe.

Requires: 2.8 or higher
Compatible up to: 3.9.2
Last Updated: 2014-6-16
Downloads: 4,336

Ratings

3 stars
3.2 out of 5 stars

Support

1 of 1 support threads in the last two months have been resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1 0,1,0
100,1,1
100,1,1
100,1,1
100,1,1
0,1,0
100,1,1
100,2,2
100,1,1
0,2,0
100,1,1
100,1,1 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1 100,3,3 100,1,1 100,1,1 100,2,2 100,2,2
100,1,1