Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: pkp/coins
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1_0_3-3
Choose a base ref
...
head repository: pkp/coins
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref

Commits on Feb 17, 2023

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    ed1d462 View commit details
  2. Merge pull request #9 from defstat/i8598-file-merge

    [main] #8598 Locale Migration Changes
    asmecher authored Feb 17, 2023
    Copy the full SHA
    1361c85 View commit details
  3. Copy the full SHA
    9e1360c View commit details
  4. Translated using Weblate (Georgian)

    Currently translated at 100.0% (2 of 2 strings)
    
    Translation: Common Plugins/COinS Plugin
    Translate-URL: http://translate.pkp.sfu.ca/projects/plugins/coins-plugin/ka_GE/
    delphiknight authored and weblate committed Feb 17, 2023
    Copy the full SHA
    7d80707 View commit details
  5. Added translation using Weblate (Malay)

    Ga Ja Poh authored and weblate committed Feb 17, 2023
    Copy the full SHA
    a3ff964 View commit details
  6. Translated using Weblate (Malay)

    Currently translated at 100.0% (2 of 2 strings)
    
    Translation: Common Plugins/COinS Plugin
    Translate-URL: http://translate.pkp.sfu.ca/projects/plugins/coins-plugin/ms/
    Ga Ja Poh authored and weblate committed Feb 17, 2023
    Copy the full SHA
    f037e05 View commit details
  7. Translated using Weblate (Ukrainian)

    Currently translated at 100.0% (2 of 2 strings)
    
    Translation: Common Plugins/COinS Plugin
    Translate-URL: http://translate.pkp.sfu.ca/projects/plugins/coins-plugin/uk_UA/
    Petro Bilous authored and weblate committed Feb 17, 2023
    Copy the full SHA
    9580e05 View commit details
  8. Copy the full SHA
    62d3764 View commit details
  9. Translated using Weblate (Bulgarian)

    Currently translated at 100.0% (2 of 2 strings)
    
    Translation: Common Plugins/COinS Plugin
    Translate-URL: http://translate.pkp.sfu.ca/projects/plugins/coins-plugin/bg_BG/
    ckamburov authored and weblate committed Feb 17, 2023
    Copy the full SHA
    1ed8fc9 View commit details
  10. Copy the full SHA
    fcac53c View commit details
  11. Translated using Weblate (Armenian)

    Currently translated at 100.0% (2 of 2 strings)
    
    Translation: Common Plugins/COinS Plugin
    Translate-URL: http://translate.pkp.sfu.ca/projects/plugins/coins-plugin/hy_AM/
    tigran54 authored and weblate committed Feb 17, 2023
    Copy the full SHA
    1703311 View commit details
  12. Translated using Weblate (Polish)

    Currently translated at 100.0% (2 of 2 strings)
    
    Translation: Common Plugins/COinS Plugin
    Translate-URL: http://translate.pkp.sfu.ca/projects/plugins/coins-plugin/pl_PL/
    Piotr Pielach authored and weblate committed Feb 17, 2023
    Copy the full SHA
    f17becf View commit details
  13. Copy the full SHA
    1e01498 View commit details
  14. Standardize locale codes

    asmecher committed Feb 17, 2023
    Copy the full SHA
    b49af70 View commit details
  15. Standardize locale codes

    asmecher committed Feb 17, 2023
    Copy the full SHA
    f779fcf View commit details
  16. Standardize locale codes

    asmecher committed Feb 17, 2023
    Copy the full SHA
    92b4499 View commit details

Commits on Apr 11, 2023

  1. Prep for 3.4.0

    asmecher committed Apr 11, 2023
    Copy the full SHA
    68dada8 View commit details
  2. Update to version 1.0.4-0

    asmecher committed Apr 11, 2023
    Copy the full SHA
    b4e56be View commit details

Commits on Aug 29, 2023

  1. Copy the full SHA
    e679ae0 View commit details
  2. Translated using Weblate (Slovenian)

    Currently translated at 100.0% (2 of 2 strings)
    
    Translation: Common Plugins/COinS Plugin
    Translate-URL: http://translate.pkp.sfu.ca/projects/plugins/coins-plugin/sl/
    ULP-SLO authored and weblate committed Aug 29, 2023
    Copy the full SHA
    c0a6dad View commit details
  3. Translated using Weblate (Ukrainian)

    Currently translated at 100.0% (2 of 2 strings)
    
    Translation: Common Plugins/COinS Plugin
    Translate-URL: http://translate.pkp.sfu.ca/projects/plugins/coins-plugin/uk/
    Petro Bilous authored and weblate committed Aug 29, 2023
    Copy the full SHA
    c4a327b View commit details
  4. Copy the full SHA
    dbd2f08 View commit details

Commits on Jun 18, 2024

  1. Copy the full SHA
    bbee1e7 View commit details

Commits on Nov 18, 2024

  1. Update to version 1.0.4.1

    asmecher committed Nov 18, 2024
    Copy the full SHA
    cb5d6d6 View commit details

Commits on Nov 19, 2024

  1. locales renamed

    bozana committed Nov 19, 2024
    Copy the full SHA
    7ad6dcc View commit details

Commits on Dec 10, 2024

  1. rename pt_PT to pt

    bozana committed Dec 10, 2024
    Copy the full SHA
    46c987e View commit details

Commits on Dec 11, 2024

  1. Merge pull request #10 from bozana/9707

    pkp/pkp-lib#9707 rename locales
    bozana authored Dec 11, 2024
    Copy the full SHA
    a7d3139 View commit details

Commits on Dec 16, 2024

  1. Copy the full SHA
    ce28b6f View commit details

Commits on Dec 18, 2024

  1. Merge pull request #11 from bozana/10653

    fix deprecated submission functions
    bozana authored Dec 18, 2024
    Copy the full SHA
    4b90ab1 View commit details

Commits on Dec 19, 2024

  1. Copy the full SHA
    312517d View commit details
  2. Merge pull request #12 from bozana/10653-1

    after review: fix deprecated functions
    bozana authored Dec 19, 2024
    Copy the full SHA
    4ffd98a View commit details
Showing with 300 additions and 213 deletions.
  1. +0 −133 CoinsPlugin.inc.php
  2. +140 −0 CoinsPlugin.php
  3. +0 −15 index.php
  4. 0 locale/{ar_IQ → ar}/locale.po
  5. +8 −0 locale/az/locale.po
  6. +22 −0 locale/bg/locale.po
  7. 0 locale/{ca_ES → ca}/locale.po
  8. 0 locale/{cs_CZ → cs}/locale.po
  9. 0 locale/{da_DK → da}/locale.po
  10. 0 locale/{de_DE → de}/locale.po
  11. 0 locale/{el_GR → el}/locale.po
  12. 0 locale/{en_US → en}/locale.po
  13. +4 −1 locale/{es_AR → es}/locale.po
  14. +0 −18 locale/es_ES/locale.po
  15. 0 locale/{eu_ES → eu}/locale.po
  16. 0 locale/{fa_IR → fa}/locale.po
  17. 0 locale/{fi_FI → fi}/locale.po
  18. 0 locale/{fr_FR → fr}/locale.po
  19. 0 locale/{gl_ES → gl}/locale.po
  20. 0 locale/{hr_HR → hr}/locale.po
  21. +23 −0 locale/hy/locale.po
  22. 0 locale/{id_ID → id}/locale.po
  23. 0 locale/{it_IT → it}/locale.po
  24. 0 locale/{ja_JP → ja}/locale.po
  25. +20 −0 locale/ka/locale.po
  26. 0 locale/{ko_KR → ko}/locale.po
  27. 0 locale/{mk_MK → mk}/locale.po
  28. +21 −0 locale/ms/locale.po
  29. 0 locale/{no_NO → nb_NO}/locale.po
  30. 0 locale/{nl_NL → nl}/locale.po
  31. +25 −0 locale/pl/locale.po
  32. +0 −18 locale/pl_PL/locale.po
  33. 0 locale/{pt_PT → pt}/locale.po
  34. 0 locale/{ro_RO → ro}/locale.po
  35. 0 locale/{ru_RU → ru}/locale.po
  36. +9 −8 locale/{sl_SI → sl}/locale.po
  37. 0 locale/{sr_SR → sr_Latn}/locale.po
  38. 0 locale/{sv_SE → sv}/locale.po
  39. 0 locale/{tr_TR → tr}/locale.po
  40. +26 −0 locale/uk/locale.po
  41. +0 −18 locale/uk_UA/locale.po
  42. 0 locale/{vi_VN → vi}/locale.po
  43. 0 locale/{zh_CN → zh_Hans}/locale.po
  44. +2 −2 version.xml
133 changes: 0 additions & 133 deletions CoinsPlugin.inc.php

This file was deleted.

140 changes: 140 additions & 0 deletions CoinsPlugin.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
<?php

/**
* @file CoinsPlugin.php
*
* Copyright (c) 2013-2023 Simon Fraser University
* Copyright (c) 2003-2023 John Willinsky
* Distributed under the GNU GPL v3. For full terms see the file LICENSE.
*
* @class CoinsPlugin
* @brief COinS plugin class
*/

namespace APP\plugins\generic\coins;

use PKP\plugins\GenericPlugin;
use PKP\plugins\Hook;
use PKP\config\Config;
use APP\core\Application;
use APP\template\TemplateManager;

class CoinsPlugin extends GenericPlugin {
/**
* Called as a plugin is registered to the registry
* @param $category String Name of category plugin was registered to
* @return boolean True iff plugin initialized successfully; if false,
* the plugin will not be registered.
*/
function register($category, $path, $mainContextId = null) {
$success = parent::register($category, $path, $mainContextId);
if (!Config::getVar('general', 'installed') || defined('RUNNING_UPGRADE')) return true;
if ($success && $this->getEnabled()) {
Hook::add('Templates::Common::Footer::PageFooter', [$this, 'insertFooter']);
}
return $success;
}

/**
* Get the display name of this plugin
* @return string
*/
function getDisplayName() {
return __('plugins.generic.coins.displayName');
}

/**
* Get the description of this plugin
* @return string
*/
function getDescription() {
return __('plugins.generic.coins.description');
}

/**
* Insert COinS tag.
*/
function insertFooter(string $hookName, array $params) : bool
{
if (!$this->getEnabled()) return false;
$request = Application::get()->getRequest();

// Ensure that the callback is being called from a page COinS should be embedded in.
if (!in_array($request->getRequestedPage() . '/' . $request->getRequestedOp(), [
'article/view',
])) return false;

$smarty =& $params[1];
$output =& $params[2];
$templateMgr = TemplateManager::getManager($request);

$article = $templateMgr->getTemplateVars('article');
$journal = $templateMgr->getTemplateVars('currentJournal');
$issue = $templateMgr->getTemplateVars('issue');
$publication = $article->getCurrentPublication();

$vars = [
['ctx_ver', 'Z39.88-2004'],
['rft_id', $request->url(null, 'article', 'view', $article->getId())],
['rft_val_fmt', 'info:ofi/fmt:kev:mtx:journal'],
['rft.language', $article->getData('locale')],
['rft.genre', 'article'],
['rft.title', $journal->getLocalizedName()],
['rft.jtitle', $journal->getLocalizedName()],
['rft.atitle', $publication->getFullTitles()[$article->getData('locale')]],
['rft.artnum', $article->getBestId()],
['rft.stitle', $journal->getLocalizedSetting('abbreviation')],
];
if ($issue) {
$vars = array_merge($vars, [
['rft.volume', $issue->getVolume()],
['rft.issue', $issue->getNumber()],
]);
}
$authors = $publication->getData('authors');
if ($firstAuthor = $authors->first()) {
$vars = array_merge($vars, [
['rft.aulast', $firstAuthor->getFamilyName($article->getData('locale'))],
['rft.aufirst', $firstAuthor->getGivenName($article->getData('locale'))],
]);
}

$datePublished = $publication->getData('datePublished');
if (!$datePublished && $issue) {
$datePublished = $issue->getDatePublished();
}

if ($datePublished) {
$vars[] = ['rft.date', date('Y-m-d', strtotime($datePublished))];
}

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

if ($doi = $publication->getStoredPubId('doi')) {
$vars[] = ['rft_id', 'info:doi/' . $doi];
}
if ($publication->getData('pages')) {
$vars[] = ['rft.pages', $publication->getData('pages')];
}
if ($journal->getSetting('printIssn')) {
$vars[] = ['rft.issn', $journal->getSetting('printIssn')];
}
if ($journal->getSetting('onlineIssn')) {
$vars[] = ['rft.eissn', $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;
}
}

15 changes: 0 additions & 15 deletions index.php

This file was deleted.

File renamed without changes.
8 changes: 8 additions & 0 deletions locale/az/locale.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Osman Durmaz <osmandurmaz@hotmail.de>, 2023.
msgid ""
msgstr ""
"Language: az\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Weblate\n"
22 changes: 22 additions & 0 deletions locale/bg/locale.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Cyril Kamburov <cc@intermedia.bg>, 2022.
msgid ""
msgstr ""
"PO-Revision-Date: 2022-03-27 15:56+0000\n"
"Last-Translator: Cyril Kamburov <cc@intermedia.bg>\n"
"Language-Team: Bulgarian <http://translate.pkp.sfu.ca/projects/plugins/"
"coins-plugin/bg_BG/>\n"
"Language: bg_BG\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 3.9.1\n"

msgid "plugins.generic.coins.description"
msgstr ""
"Добавката COinS добавя OpenURL дескриптор към страниците със статии ("
"абстрактни и HTML), които могат да се използват напр. за извличане към "
"инструменти за цитиране."

msgid "plugins.generic.coins.displayName"
msgstr "Добавка COinS"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 4 additions & 1 deletion locale/es_AR/locale.po → locale/es/locale.po
Original file line number Diff line number Diff line change
@@ -15,4 +15,7 @@ msgid "plugins.generic.coins.displayName"
msgstr "Módulo Coins"

msgid "plugins.generic.coins.description"
msgstr "El módulo Coins agrega un descriptor de OpenURL a las páginas de los artículos (resumen y HTML) que puede ser usado, por ejemplo, para la extracción en las herramientas de citas."
msgstr ""
"El módulo Coins agrega un descriptor de OpenURL a las páginas de los "
"artículos (resumen y HTML) que puede ser usado, por ejemplo, para la "
"extracción en las herramientas de citas."
18 changes: 0 additions & 18 deletions locale/es_ES/locale.po

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
23 changes: 23 additions & 0 deletions locale/hy/locale.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Artashes Mirzoyan <amirzoyan@sci.am>, 2022.
# Tigran Zargaryan <tigran@flib.sci.am>, 2022.
msgid ""
msgstr ""
"PO-Revision-Date: 2022-07-03 05:31+0000\n"
"Last-Translator: Tigran Zargaryan <tigran@flib.sci.am>\n"
"Language-Team: Armenian <http://translate.pkp.sfu.ca/projects/plugins/"
"coins-plugin/hy/>\n"
"Language: hy\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
"X-Generator: Weblate 3.9.1\n"

msgid "plugins.generic.coins.description"
msgstr ""
"COinS փլագինը հոդվածի էջերին ավելացնում է OpenURL նկարագրիչ ("
"համառոտագրություն և HTML), որը կարող է օգտագործվել, օրինակ. մեջբերման "
"գործիքներում տարանջատման համար:"

msgid "plugins.generic.coins.displayName"
msgstr "COinS փլագին"
File renamed without changes.
File renamed without changes.
File renamed without changes.
20 changes: 20 additions & 0 deletions locale/ka/locale.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
msgid ""
msgstr ""
"PO-Revision-Date: 2021-04-08 08:55+0000\n"
"Last-Translator: Dimitri Gogelia <dimitri.gogelia@iliauni.edu.ge>\n"
"Language-Team: Georgian <http://translate.pkp.sfu.ca/projects/plugins/"
"coins-plugin/ka_GE/>\n"
"Language: ka_GE\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 3.9.1\n"

msgid "plugins.generic.coins.displayName"
msgstr "CoinS პლაგინი"

msgid "plugins.generic.coins.description"
msgstr ""
"CoinS პლაგინი სტატიის გვერდებს (აბსტრაქტი და HTML) ამატებს OpenURL "
"აღწერილობას, რომლის გამოყენება შეიძლება მაგალითად ციტირების ხელსაწყოებში."
File renamed without changes.
File renamed without changes.
Loading