[WordPress] 外掛分享: Mendeley Plugin

前言介紹

  • 這款 WordPress 外掛「Mendeley Plugin」是 2010-08-10 上架。 目前已經下架不再更新,不建議安裝使用。
  • 目前有 200 個安裝啟用數。
  • 上一次更新是 2024-01-30,距離現在已有 460 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛最低要求 WordPress 4.0 以上版本才可以安裝。
  • 有 6 人給過評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

kochm |

外掛標籤

mendeley | bibliography |

內容簡介

>Mendeley Plugin for WordPress 是一個 WordPress 外掛,可以在 WordPress 博客中顯示來自 Mendeley(“共享參考文獻系統”(www.mendeley.com))的信息。

使用 Mendeley 的公共 API,個人、公共或共享收藏中文獻的元信息被加載並格式化為書目項目。

可以使用 WordPress 短碼將列表包含在文章或頁面中:

[mendeley type="folders" id="xxx" groupby="xxx"]
[mendeley type="groups" id="xxx" groupby="xxx" style="cover,link"]
[mendeley type="groups" id="xxx" sortby="xxx" sortorder="xxx" style="short"]
[mendeley type="groups" id="xxx" groupby="xxx" filter="author=Michael Koch"]
[mendeley type="groups" id="xxx" groupby="xxx" filter="author=Michael Koch;type=journal"]
[mendeley type="groups" id="xxx" groupby="xxx" filter="type=book_section"]
[mendeley type="groups" id="xxx" groupby="xxx" csl="http://DOMAINNAME/csl/custom_style.csl" style="cover,link"]

- “id” 屬性是收藏或群組的 Mendeley 標識符 - 您可以在 Mendeley(Web 或桌面應用程序)中找到此信息 - 或使用插件後端的“Request Collection Ids”功能 - 例如值:1f0508c0-8256-3ba7-b924-485e720245d5
- “type” 屬性可以設置為“folders”或“groups”或“own”
- “groupby” 屬性是可選的; 可能的值是所有 Mendeley 文檔屬性 - 請參見 http://dev.mendeley.com/methods/#core-document-attributes - 例如“authors”、“year”
- “sortby” 屬性是可選的; 可能的值與 groupby 相同
- 屬性“sortorder”和“grouporder”可以有“asc”和“desc”值
- 如果提供了排序鍵和分組鍵,則首先在排序鍵上進行排序,然後在分組鍵上進行分組
- “filter”中可以過濾一個或多個相等的匹配;如果指定了多個過濾規則,則僅在所有過濾規則匹配時顯示文檔
- 要過濾的可能的屬性名稱是:type、title、year、author、editor、publisher、tag、keyword、abstract(當過濾標籤或關鍵字時,將執行子字符串搜索,因此“blog”也符合“microblog”)
- 可用於屬性類型的可能值:['journal' 或 'book' 或 'generic' 或 'book_section' 或 'conference_proceedings' 或 'working_paper' 或 'report' 或 'web_page' 或 'thesis' 或 'magazine_article' 或 'statute' 或 'patent' 或 'newspaper_article' 或 'computer_program' 或 'hearing' 或 'television_broadcast' 或 'encyclopedia_article' 或 'case' 或 'film' 或 'bill']
- “style” 屬性控制輸出-可以指定多個由逗號分隔的值-可能的值包括:cover(添加封面圖片),link(添加到全文的鏈接),short(使用短版本-即用於小部件-如果使用 csl 格式化則不可能)
- “csl” 屬性是可選的;值必須包含帶有 .csl 文件的有效 URL
- “maxdocs” 屬性可用於限制顯示的文檔數量(例如 maxdocs="10")

v1.0 中的更改(2014 年 12 月)

在插件的 v1.0 中,由於支持新的 Mendeley API,有一些重要的更改。

最重要的問題是,群組和文件夾的 ID 現在必須是 UUID - 因此,您必須再次查找 ID - 例如使用 WordPress 後端中插件的設置頁面中的列表功能。

此外,某些屬性名稱和可能的值已更改 - 因此,例如,對於類型的過濾器必須進行更改。

我們現在不再支持過時的集合類型“shared”、“sharedcollections”、“collections”-只支持“groups”和“folders”。

原文外掛簡介

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" style="cover,link"]
[mendeley type="groups" id="xxx" sortby="xxx" sortorder="xxx" style="short"]
[mendeley type="groups" id="xxx" groupby="xxx" filter="author=Michael Koch"]
[mendeley type="groups" id="xxx" groupby="xxx" filter="author=Michael Koch;type=journal"]
[mendeley type="groups" id="xxx" groupby="xxx" filter="type=book_section"]
[mendeley type="groups" id="xxx" groupby="xxx" csl="http://DOMAINNAME/csl/custom_style.csl" style="cover,link"]

- the attribute "id" is the Mendeley identifier of the group or folder - You can find this in Mendeley (Web or desktp app) - or use the function "Request Collection Ids" in the backend of the plugin - example value: 1f0508c0-8256-3ba7-b924-485e720245d5
- the attribute "type" can be set to "folders" or "groups" or "own"
- the attribute "groupby" is optional; possible values are all mendeley document attribute - see http://dev.mendeley.com/methods/#core-document-attributes - e.g. "authors", "year"
- the attribute "sortby" is optional; possible values are the same as for groupby
- the attributes "sortorder" and "grouporder" 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 attribute names to filter for are: type, title, year, author, editor, publisher, tag, keyword, abstract (when filtering for tag or keyword, a substring search is performed, so "blog" also matches "microblog")
- possible values for attribute type: ['journal' or 'book' or 'generic' or 'book_section' or 'conference_proceedings' or 'working_paper' or 'report' or 'web_page' or 'thesis' or 'magazine_article' or 'statute' or 'patent' or 'newspaper_article' or 'computer_program' or 'hearing' or 'television_broadcast' or 'encyclopedia_article' or 'case' or 'film' or 'bill']
- the attribute "style" controlls the output - you can specify several values separated by commas - possible values are: cover (add cover images), link (add links to full texts), short (use a short version - i.e. for widgets - not possible if csl formatting is used)
- the attribute "csl" is optional; the value must contain a valid URL with a .csl file
- the attribute "maxdocs" can be used to limit the number of documents displayed (e.g. maxdocs="10")

Changes in v1.0 (December 2014)
In v1.0 of the plugin there are some important changes due to support
for the new Mendeley API.
The most important issue is that ids of groups and folders now have to
be uuids – so, you have to look up the ids again – e.g. using the list
feature in the settings page of the plugin in the WordPress backend.
Additionally, some attribute names and possible values have been
changed – so for example filters for type have to be changed.
We now also no longer support the outdated collection types “shared”,
“sharedcollections”, “collections” – Only “groups” and “folders” are
supported.
Known Problems
The current version of the plugin (v1.0) has one known problem with
requesting and authorizing access tokens: When the activity is
triggered in the backend using the Safari browser, the redirection to
the Mendeley API site might not work (blank page) – If this is the
case for you, please try with a different browser. For us Firefox has
always worked.
Formatting
If you do not specify a CSL stylesheet, full entries are formatted the following way – so, the style can be tailored using CSS.

grouptitle

$authors</span>
($year):
$title
, $publication_outlet
$volume($issue)
, $editors
, $pages
, $city: $publisher
, $urltxt/span

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:

  • title (if url is defined, then this title is linked to url)
  • ...

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:

install plugin

activate plugin

get Customer Key and Customer Secret from http://dev.mendeley.com/

enter the information in the wp-mendeley tab in the backend

press “Get Access Key” on the wp-mendeley configuration page

then you are redirected to the Mendeley web site to authorize the request, and redirected back to the blog (see Known Problems when this step does not work)

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://dev.mendeley.com/methods/#core-document-attributes) 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}
When caching PDF files is enabled, you additionally can use “filelink”
which will produce the word PDF with a link to the PDF file – and the
special attribute “coverimage” which will produce an image tag with a
link to an image of the first page of the PDF. To switch off generating
file links for single documents (e.g. because of copyright issues),
you can add the tag “nofilelink” to the tags of the document in
Mendeley.
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. Do not forget to edit the file – specify the id of the
Mendeley group you want to access in the link-line.
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.
Source Code Documentation
The source code of the plugin is more or less documented. Here some
information about the overall structure:
The main function of the plugin is “formatCollection”. This function
is called from different places in order to create a formatted list of
references. In this function

first the output cache ist checked (getOutputFromCache) – in this cache completely formatted outputs for queries are stored

then the list of documents is retrieved from Mendeley – depending on the type of collection (group or folder) – either by getDocumentListForFolder() oder getDocumentsForGroup()

and then the documents are sorted and grouped according to the request (groupDocs)

finally (in the loop producing the output) filter parameters are checked (checkFilter)

the output for single references is produced using the functions formatDocumentShort() and formatDocument()

The following Mendeley API calls are used

retrieving document list from a group: /documents?group_id=GROUPID

retrieving document list from a folder: /folders/FOLDERID/documents; Iterate /documents/DOCID

Thanks …
Thanks for various contributions to Rhodri Cusack, Constantin Orasan 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.

各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Mendeley Plugin」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


最新版本

延伸相關外掛(你可能也想知道)

  • Mendeley Profile Plugin 》這個外掛可以顯示註冊在您的 Mendeley 個人檔案中的出版物、專業經驗、履歷、教育以及研究成果。您也可以自訂哪些部分要顯示,哪些不要顯示。, Mendeley Prof...。

文章
Filter
Apply Filters
Mastodon