Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ORCID plugin 2.4.8 #14

Open
wants to merge 33 commits into
base: ojs-dev-2_4
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
a1e4fe3
New features added
atarix83 Mar 23, 2017
5ceaf05
Contributions added on comments
atarix83 Mar 23, 2017
9d6db49
show/hide buttons at init
atarix83 Mar 24, 2017
8b85f16
Add profile information about affiliations and researcher Url.
atarix83 Apr 6, 2017
061d8a8
Change README.md
atarix83 Apr 6, 2017
0739157
Fix settings bug
atarix83 Apr 6, 2017
821aa96
Fix email field notice
atarix83 Apr 7, 2017
9822469
Adjust indentation
atarix83 Apr 10, 2017
d97b6f4
Adjust indentation
atarix83 Apr 26, 2017
90c1546
Adjust indentation
atarix83 Apr 27, 2017
8828345
Update OrcidProfilePlugin.inc.php
atarix83 Jun 26, 2017
2eb0064
Update emailTemplates.xml
atarix83 Jun 26, 2017
c41f1f0
Update locale.xml
atarix83 Jun 26, 2017
b8c8637
Update orcidProfileSearchForm.tpl
atarix83 Jun 26, 2017
cd5b26e
Update OrcidProfilePlugin.inc.php
atarix83 Jun 26, 2017
25ef5c3
Update OrcidProfilePlugin.inc.php
atarix83 Jun 26, 2017
8cd260e
Update OrcidProfileSettingsForm.inc.php
atarix83 Jun 26, 2017
5ae3084
Update OrcidProfilePlugin.inc.php
atarix83 Jun 26, 2017
393e2ce
Update OrcidProfilePlugin.inc.php
atarix83 Jun 26, 2017
d354b80
Update README.md
atarix83 Jun 26, 2017
acce71d
Update settingsForm.tpl
atarix83 Jun 26, 2017
84403c1
Update OrcidHandler.inc.php
atarix83 Jun 26, 2017
873e71a
Update OrcidHandler.inc.php
atarix83 Jun 26, 2017
e299474
Update OrcidHandler.inc.php
atarix83 Jun 26, 2017
68f40e5
Update orcidProfile.tpl
atarix83 Jun 26, 2017
b48814b
Update orcidProfileSearch.tpl
atarix83 Jun 26, 2017
2c6bbb5
Update orcidProfileSearchResults.tpl
atarix83 Jun 26, 2017
e88a6c3
Fix issue with searchResults pager
atarix83 Jun 26, 2017
14529bb
Update orcidProfileSearchResults.tpl
atarix83 Jun 26, 2017
04b3173
Update orcidProfileSearchForm.tpl
atarix83 Jun 26, 2017
0c3d312
Update to ORCID API v2.1
sourcedump Feb 23, 2018
547220f
Indentation fix
sourcedump Feb 23, 2018
b18c342
ORCID url update
sourcedump Mar 16, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
312 changes: 266 additions & 46 deletions OrcidProfilePlugin.inc.php

Large diffs are not rendered by default.

11 changes: 8 additions & 3 deletions OrcidProfileSettingsForm.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
/**
* @file plugins/generic/googleAnalytics/OrcidProfileSettingsForm.inc.php
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a googleAnalytics there - should be orcidProfile

*
* Copyright (c) 2015-2016 University of Pittsburgh
* Copyright (c) 2014-2016 Simon Fraser University Library
* Copyright (c) 2003-2016 John Willinsky
* Copyright (c) 2015-2017 University of Pittsburgh
* Copyright (c) 2014-2017 Simon Fraser University Library
* Copyright (c) 2003-2017 John Willinsky
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
* Contributed by 4Science.
*
* @class OrcidProfileSettingsForm
* @ingroup plugins_generic_orcidProfile
*
Expand Down Expand Up @@ -50,6 +52,7 @@ function initData() {
'orcidProfileAPIPath' => $plugin->getSetting($journalId, 'orcidProfileAPIPath'),
'orcidClientId' => $plugin->getSetting($journalId, 'orcidClientId'),
'orcidClientSecret' => $plugin->getSetting($journalId, 'orcidClientSecret'),
'itemsPerPage' => $plugin->getSetting($journalId, 'itemsPerPage'),
);
}

Expand All @@ -60,6 +63,7 @@ function readInputData() {
$this->readUserVars(array('orcidProfileAPIPath'));
$this->readUserVars(array('orcidClientId'));
$this->readUserVars(array('orcidClientSecret'));
$this->readUserVars(array('itemsPerPage'));
}

/**
Expand All @@ -72,6 +76,7 @@ function execute() {
$plugin->updateSetting($journalId, 'orcidProfileAPIPath', trim($this->getData('orcidProfileAPIPath'), "\"\';"), 'string');
$plugin->updateSetting($journalId, 'orcidClientId', $this->getData('orcidClientId'), 'string');
$plugin->updateSetting($journalId, 'orcidClientSecret', $this->getData('orcidClientSecret'), 'string');
$plugin->updateSetting($journalId, 'itemsPerPage', $this->getData('itemsPerPage'), 'string');
}
}

Expand Down
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,27 @@
Plugin for PKP user profiles (tested with OJS 2.x)

Copyright © 2015-2016 University of Pittsburgh
<br />Copyright © 2014-2016 Simon Fraser University Library
<br />Copyright © 2003-2016 John Willinsky
<br />Copyright © 2014-2017 Simon Fraser University Library
<br />Copyright © 2003-2017 John Willinsky

Licensed under GPL 2 or better.

Contributed by 4Science (http://www.4science.it).

## Features:

* Hooks into the User Profile, Registration, and Submission (step 3) forms
* Requests ORCIDs of authors via email
* Searchs for co-authors ORCIDs
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Searchs -> Searches?

* Requests ORCIDs of co-authors via email

## Install:

* Copy the source into the PKP product's plugins/generic folder.
* Run `tools/upgrade.php upgrade` to allow the system to recognize the new plugin.
* Enable this plugin within the administration interface.
* Set up [an application with ORCID](https://orcid.org/developer-tools).
* The URI and description are to reassure users.
* The redirect URI can be anything within your OJS/OMP installation.
* ORCID will give you a client ID and secret.
* The URI and description are to reassure users.
* The redirect URI can be anything within your OJS/OMP installation.
* ORCID will give you a client ID and secret.
* Consider the settings within the administation interface.
* Enter the client and secret from the ORCID application setup.
* Enter the client and secret from the ORCID application setup.
11 changes: 8 additions & 3 deletions css/orcidProfile.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#connect-orcid-button{
#connect-orcid-button, #search-orcid-button, button[id^="search-orcid-button-"], button[id^="remove-orcid-button-"] {
border: 1px solid #D3D3D3;
padding: .3em;
background-color: #fff;
Expand All @@ -9,17 +9,22 @@
font-weight: bold;
font-size: .8em;
line-height: 24px;
margin: .3em;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, one more here :)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adjusted

vertical-align: middle;
}

#connect-orcid-button:hover{
#connect-orcid-button:hover, button[id^="search-orcid-button-"]:hover{
border: 1px solid #338caf;
color: #338caf;
}

#orcid-id-logo{
.orcid-id-logo{
display: block;
margin: 0 .5em 0 0;
padding: 0;
float: left;
}

.search-content {
padding: 10px !important;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And here.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adjusted

}
6 changes: 4 additions & 2 deletions emailTemplates.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
<!--
* plugins/generic/orcidProfile/emailTemplates.xml
*
* Copyright (c) 2013-2016 Simon Fraser University Library
* Copyright (c) 2003-2016 John Willinsky
* Copyright (c) 2013-2017 Simon Fraser University Library
* Copyright (c) 2003-2017 John Willinsky
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
* Contributed by 4Science (http://www.4science.it).
*
* Email templates XML file.
-->
<emails>
Expand Down
8 changes: 5 additions & 3 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
/**
* @file plugins/generic/orcidProfile/index.php
*
* Copyright (c) 2015-2016 University of Pittsburgh
* Copyright (c) 2014-2016 Simon Fraser University Library
* Copyright (c) 2003-2016 John Willinsky
* Copyright (c) 2015-2017 University of Pittsburgh
* Copyright (c) 2014-2017 Simon Fraser University Library
* Copyright (c) 2003-2017 John Willinsky
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
* Contributed by 4Science (http://www.4science.it).
*
* @ingroup plugins_generic_orcidProfile
* @brief Wrapper for ORCID Profile plugin.
Expand Down
4 changes: 2 additions & 2 deletions locale/en_US/emailTemplates.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<!--
* @file plugins/generic/orcidProfile/locale/en_US/emailTemplates.xml
*
* Copyright (c) 2013-2016 Simon Fraser University Library
* Copyright (c) 2003-2016 John Willinsky
* Copyright (c) 2013-2017 Simon Fraser University Library
* Copyright (c) 2003-2017 John Willinsky
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
* Localized email templates XML file.
Expand Down
23 changes: 19 additions & 4 deletions locale/en_US/locale.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
<!--
* plugins/generic/orcidPlugin/locale/en_US/locale.xml
*
* Copyright (c) 2015-2016 University of Pittsburgh
* Copyright (c) 2014-2016 Simon Fraser University Library
* Copyright (c) 2003-2016 John Willinsky
* Copyright (c) 2015-2017 University of Pittsburgh
* Copyright (c) 2014-2017 Simon Fraser University Library
* Copyright (c) 2003-2017 John Willinsky
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
* Contributed by 4Science (http://www.4science.it).
*
* ORCID Profile plugin localization strings
-->

Expand All @@ -17,11 +19,24 @@
<message key="plugins.generic.orcidProfile.displayName">ORCID Profile Plugin</message>
<message key="plugins.generic.orcidProfile.description"><![CDATA[Allows for the import of user profile information from ORCID.]]></message>
<message key="plugins.generic.orcidProfile.instructions"><![CDATA[You can pre-populate this form with information from an ORCID profile. Enter the email address or ORCID iD associated with the ORCID profile, then click "Submit".]]></message>
<message key="plugins.generic.orcidProfile.noData">Couldn\'t find any data from ORCID.</message>
<message key="plugins.generic.orcidProfile.noData">Couldn't find any data from ORCID.</message>
<message key="plugins.generic.orcidProfile.emailOrOrcid">Email address or ORCID iD:</message>
<message key="plugins.generic.orcidProfile.submitAction">Submit</message>
<message key="plugins.generic.orcidProfile.connect">Create or Connect your ORCID iD</message>
<message key="plugins.generic.orcidProfile.searchOrcidId">Search the ORCID iD</message>
<message key="plugins.generic.orcidProfile.removeOrcidId">Remove ORCID iD</message>
<message key="plugins.generic.orcidProfile.affiliations">Affiliations</message>
<message key="plugins.generic.orcidProfile.researcherUrl">Researcher Url</message>
<message key="plugins.generic.orcidProfile.searchAndOr">and / or</message>
<message key="plugins.generic.orcidProfile.searchPageTitle">Search public ORCID registry data</message>
<message key="plugins.generic.orcidProfile.searchResultsList">Choose and select the exact match from the list below:</message>
<message key="plugins.generic.orcidProfile.searchResultsNotice">If you are not sure to choose the exact match it is better to skip this step and leave ORCID iD field empty.</message>
<message key="plugins.generic.orcidProfile.privateEmail">Not viewable</message>
<message key="plugins.generic.orcidProfile.noResults">No search results</message>
<message key="plugins.generic.orcidProfile.manager.orcidProfileSettings">ORCID Profile Settings</message>
<message key="plugins.generic.orcidProfile.manager.settings.description">Configure the ORCID API for use in pulling ORCID profile information into the user profile.</message>
<message key="plugins.generic.orcidProfile.manager.settings.pagePerItemDescription">The number of items per page in the overall list of ranked ORCID profile search results.</message>
<message key="plugins.generic.orcidProfile.manager.settings.pagePerItem">Items per page</message>
<message key="plugins.generic.orcidProfile.manager.settings.orcidProfileAPIPath">ORCID API</message>
<message key="plugins.generic.orcidProfile.manager.settings.orcidProfileAPIPath.public">Public</message>
<message key="plugins.generic.orcidProfile.manager.settings.orcidProfileAPIPath.publicSandbox">Public Sandbox</message>
Expand Down
35 changes: 35 additions & 0 deletions locale/it_IT/emailTemplates.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE email_texts SYSTEM "../../../../../lib/pkp/dtd/emailTemplateData.dtd">

<!--
* @file plugins/generic/orcidProfile/locale/en_US/emailTemplates.xml
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

en_US -> it_IT

*
* Copyright (c) 2013-2017 Simon Fraser University Library
* Copyright (c) 2003-2017 John Willinsky
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
* Contributed by 4Science (http://www.4science.it).
*
* Localized email templates XML file.
-->

<email_texts locale="en_US">
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change locale

<email_text key="ORCID_COLLECT_AUTHOR_ID">
<subject>Submission ORCID</subject>
<body>Caro {$authorName},

Sei stato elencato come co-autore nella submission della lavorazione "{$articleTitle}" a {$journalName}.

Per confermare tale attribuzione per favore aggiungi il tuo ORCID id alla submission visitando il link seguente.

{$authorOrcidUrl}

Per qualsiasi domanda o dubbio, ti prego di contattarmi.

{$editorialContactSignature}


</body>
<description>This email template is used to collect the ORCID id's from co-authors.</description>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this only for 'co-authors'?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

</email_text>
</email_texts>
51 changes: 51 additions & 0 deletions locale/it_IT/locale.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE locale SYSTEM "../../../../../lib/pkp/dtd/locale.dtd">

<!--
* plugins/generic/orcidPlugin/locale/en_US/locale.xml
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

en_US -> it_IT

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

orcidPlugin -> orcidProfile?

*
* Copyright (c) 2015-2017 University of Pittsburgh
* Copyright (c) 2014-2017 Simon Fraser University Library
* Copyright (c) 2003-2017 John Willinsky
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
* Contributed by 4Science (http://www.4science.it).
*
* ORCID Profile plugin localization strings for the it_IT locale
-->

<locale name="it_IT" full_name="Italiano">

<message key="plugins.generic.orcidProfile.displayName">ORCID Profile Plugin</message>
<message key="plugins.generic.orcidProfile.description"><![CDATA[Permette l'importazione di informazioni del profilo utente dal registro di ORCID.]]></message>
<message key="plugins.generic.orcidProfile.instructions"><![CDATA[È possibile precompilare il modulo con le informazioni da un profilo orcid. Inserire l'indirizzo email o ORCID iD associati al profilo ORCID, quindi fare clic su "Conferma".]]></message>
<message key="plugins.generic.orcidProfile.noData">Nessuna informazione trovata dal registro di ORCID.</message>
<message key="plugins.generic.orcidProfile.emailOrOrcid">Indirizzo Email o ORCID iD:</message>
<message key="plugins.generic.orcidProfile.submitAction">Conferma</message>
<message key="plugins.generic.orcidProfile.connect">Crea o collega il tuo ORCID iD</message>
<message key="plugins.generic.orcidProfile.searchOrcidId">Cerca l'ORCID iD</message>
<message key="plugins.generic.orcidProfile.removeOrcidId">Rimuovi l'ORCID iD</message>
<message key="plugins.generic.orcidProfile.affiliations">aAffiliazioni</message>
<message key="plugins.generic.orcidProfile.researcherUrl">Url del ricercatore</message>
<message key="plugins.generic.orcidProfile.searchAndOr">e / o</message>
<message key="plugins.generic.orcidProfile.searchPageTitle">Cerca le informazione nel registro pubblico di ORCID</message>
<message key="plugins.generic.orcidProfile.searchResultsList">Scegli e seleziona il risultato appropriato dalla seguente lista:</message>
<message key="plugins.generic.orcidProfile.searchResultsNotice">Se non sei sicuro di selezionare l'esatta corrispondenza è meglio saltare questo passaggio e lasciare il campo ORCID iD vuoto.</message>
<message key="plugins.generic.orcidProfile.privateEmail">Non visualizzabile</message>
<message key="plugins.generic.orcidProfile.noResults">Nessun risultato trovato</message>
<message key="plugins.generic.orcidProfile.manager.orcidProfileSettings">Impostazioni ORCID Profile</message>
<message key="plugins.generic.orcidProfile.manager.settings.description">Configura le API di ORCID per poter completare le informazioni del profilo dal registro di ORCID.</message>
<message key="plugins.generic.orcidProfile.manager.settings.pagePerItemDescription">Il numero di elementi mostrati per pagina risultanti da una ricerca del profilo dal registro di ORCID.</message>
<message key="plugins.generic.orcidProfile.manager.settings.pagePerItem">elementi per pagina</message>
<message key="plugins.generic.orcidProfile.manager.settings.orcidProfileAPIPath">ORCID API</message>
<message key="plugins.generic.orcidProfile.manager.settings.orcidProfileAPIPath.public">Public</message>
<message key="plugins.generic.orcidProfile.manager.settings.orcidProfileAPIPath.publicSandbox">Public Sandbox</message>
<message key="plugins.generic.orcidProfile.manager.settings.orcidProfileAPIPath.member">Member</message>
<message key="plugins.generic.orcidProfile.manager.settings.orcidProfileAPIPath.memberSandbox">Member Sandbox</message>
<message key="plugins.generic.orcidProfile.manager.settings.orcidClientId">Client ID</message>
<message key="plugins.generic.orcidProfile.manager.settings.orcidClientSecret">Client Secret</message>
<message key="plugins.generic.orcidProfile.author.submission">Collegamento ORCID</message>
<message key="plugins.generic.orcidProfile.author.submission.success">La submission è stata aggiornata correttamente con il tuo ORCID.</message>
<message key="plugins.generic.orcidProfile.author.submission.failure">Non è stato possibile aggiornare la submission con il tuo ORCID. Si prega di contattare il journal manager con il tuo nome, ORCID e i dettagli della submission.</message>
<message key="plugins.generic.orcidProfile.authFailure">OJS non è stato in grado di comunicare con il servizi di ORCID. Si prega di contattare il journal manager con il tuo nome, ORCID e i dettagli della submission.</message>
</locale>
Loading