OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Plugin for Mendeley citation format

The Plugin Gallery is a venue for users of PKP software to share their plugins.

Moderators: jmacgreg, michael, John

Forum rules
If you post a plugin here, please include information on which versions of which applications it is compatible with. Attach a tarball of the plugin (e.g. tar cvzf myPlugin-0.1.tar.gz plugins/generic/myPlugin). Thanks for contributing!

Plugin for Mendeley citation format

Postby rubenboada » Wed Jan 22, 2014 9:20 am

I need to introduce Mendeley citation format in my journals, but I didn't find this plugin. Anyone knows if exists a Mendeley plugin?

Thanks in advance
rubenboada
 
Posts: 5
Joined: Wed Jan 22, 2014 9:15 am

Re: Plugin for Mendeley citation format

Postby asmecher » Wed Jan 22, 2014 10:00 am

Hi rubenboada,

Mendeley supports COinS, as does OJS. In OJS, make sure your COinS plugin is enabled; it should already be included with recent releases.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8334
Joined: Wed Aug 10, 2005 12:56 pm

Re: Plugin for Mendeley citation format

Postby rubenboada » Thu Jan 30, 2014 9:17 am

Hi asmecher,

I enabled COins plugin, but I don't know how to add Mendeley in Citation Format Plugins, where appears RefWorks. I tried to add Mendeley Web Importer in my browser and "Save to Mendeley" a random article of my OJS and works fine, but I need to enable the "Save to Mendeley" option inside my OJS. Do you know how can I add Mendeley into citation list?

Thanks in advance
rubenboada
 
Posts: 5
Joined: Wed Jan 22, 2014 9:15 am

Re: Plugin for Mendeley citation format

Postby rubenboada » Fri Jan 31, 2014 3:09 am

Hi,

I added Mendeley succesfully in OJS. The first step has been enable COins (thanks asmecher) and then install bookmarks plugin of Mendeley, who contains Javascript code. This code executes an script who shows a Web Importer Mendeley and adds to this banner information about the article that is being showed in OJS. Finally, I added this Javascript code in block.tpl creating a new <div>:

{if $journalRt->getCaptureCite()}
<div class="articleToolItem">
<img src="{$baseUrl}/plugins/blocks/readingTools/icons/mendeley_icon.jpg" class="articleToolIcon" /> <a href="javascript:document.getElementsByTagName('body')[0].appendChild(document.createElement('script')).setAttribute('src','https://www.mendeley.com/minified/bookmarklet.js');"}>{translate key="rt.captureMendeley"}</a><br />
</div>
{/if}

Regards
rubenboada
 
Posts: 5
Joined: Wed Jan 22, 2014 9:15 am

Re: Plugin for Mendeley citation format

Postby rubenboada » Thu Feb 13, 2014 3:35 am

Hi,

I have another question about COins. When I export an item to Mendeley, it appears with "Generic" Type but I need to export with "Journal Article" Type. I found the part of code where I can change the COins tags and is in ojs/plugins/generic/coins/CoinsPlugin.inc.php, and the code is below:


function insertFooter($hookName, $params) {
if ($this->getEnabled()) {
$smarty =& $params[1];
$output =& $params[2];
$templateMgr =& TemplateManager::getManager();

$article = $templateMgr->get_template_vars('article');
$journal = $templateMgr->get_template_vars('currentJournal');
$issue = $templateMgr->get_template_vars('issue');

$authors = $article->getAuthors();
$firstAuthor =& $authors[0];

$vars = array(
array('ctx_ver', 'Z39.88-2004'),
array('rft_id', Request::url(null, 'article', 'view', $article->getId())),
array('rft_val_fmt', 'info:ofi/fmt:kev:mtx:journal'),
array('rft.genre', 'article'),
array('rft.title', $journal->getLocalizedTitle()),
array('rft.jtitle', $journal->getLocalizedTitle()),
array('rft.atitle', $article->getLocalizedTitle()),
array('rft.artnum', $article->getBestArticleId()),
array('rft.stitle', $journal->getLocalizedSetting('abbreviation')),
array('rft.volume', $issue->getVolume()),
array('rft.issue', $issue->getNumber()),
array('rft.aulast', $firstAuthor->getLastName()),
array('rft.aufirst', $firstAuthor->getFirstName()),
array('rft.auinit', $firstAuthor->getMiddleName())
);

$datePublished = $article->getDatePublished();
if (!$datePublished) $datePublished = $issue->getDatePublished();
if ($datePublished) {
$vars[] = array('rft.date', date('Y-m-d', strtotime($datePublished)));
}

foreach ($authors as $author) {
$vars[] = array('rft.au', $author->getFullName());
}

if ($doi = $article->getDoi()) $vars[] = array('rft_id', 'info:doi/' . $doi);
if ($article->getPages()) $vars[] = array('rft.pages', $article->getPages());
if ($journal->getSetting('printIssn')) $vars[] = array('rft.issn', $journal->getSetting('printIssn'));
if ($journal->getSetting('onlineIssn')) $vars[] = array('rft.issn', $journal->getSetting('onlineIssn'));

$title = '';
foreach ($vars as $entries) {
list($name, $value) = $entries;
$title .= $name . '=' . urlencode($value) . '&';
}
$title = htmlentities(substr($title, 0, -1));

$output .= "<span class=\"Z3988\" title=\"$title\"></span>\n";
}
return false;
}

I'm reading about DOI but I don't find any information about how can I specify item's type when I export it to Mendeley. Anyone knows about DOI?


Thanks in advance,

Rubén
rubenboada
 
Posts: 5
Joined: Wed Jan 22, 2014 9:15 am

Re: Plugin for Mendeley citation format

Postby asmecher » Thu Feb 13, 2014 12:23 pm

Hi Rubén,

We implemented COinS according to the documentation at http://ocoins.info/cobg.html; I'm not sure whether or not Mendeley specifically differs from the standard, but I'd suggest checking specifically the "genre" value.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8334
Joined: Wed Aug 10, 2005 12:56 pm


Return to Plugin Gallery

Who is online

Users browsing this forum: No registered users and 2 guests