Skip to content

Commit

Permalink
Multiple author affiliations (Ror)
Browse files Browse the repository at this point in the history
  • Loading branch information
GaziYucel committed Jan 24, 2025
1 parent 1189965 commit f160aac
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions GoogleScholarPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
/**
* @file plugins/generic/googleScholar/GoogleScholarPlugin.php
*
* Copyright (c) 2014-2020 Simon Fraser University
* Copyright (c) 2003-2020 John Willinsky
* Copyright (c) 2014-2024 Simon Fraser University
* Copyright (c) 2003-2024 John Willinsky
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
*
* @class GoogleScholarPlugin
Expand Down Expand Up @@ -116,8 +116,13 @@ public function submissionView($hookName, $args)
$authors = $publication->getData('authors');
foreach ($authors as $i => $author) {
$templateMgr->addHeader('googleScholarAuthor' . $i, '<meta name="citation_author" content="' . htmlspecialchars($author->getFullName(false, false, $publicationLocale)) . '"/>');
if ($affiliation = $author->getLocalizedData('affiliation', $publicationLocale)) {
$templateMgr->addHeader('googleScholarAuthor' . $i . 'Affiliation', '<meta name="citation_author_institution" content="' . htmlspecialchars($affiliation) . '"/>');
foreach($author->getAffiliations() as $affiliation) {
if (!empty($affiliation->getLocalizedName())) {
$templateMgr->addHeader(
'googleScholarAuthor' . $i . 'Affiliation' . $affiliation->getId(),
'<meta name="citation_author_institution" content="' . htmlspecialchars($affiliation->getLocalizedName()) . '"/>'
);
}
}
}

Expand Down

0 comments on commit f160aac

Please sign in to comment.