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

Multiple author affiliations #23

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
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
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 @@ -115,8 +115,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->getLocalizedAffiliations($publicationLocale) as $affiliation) {
if (!empty($affiliation['name'])) {
$templateMgr->addHeader(
'googleScholarAuthor' . $i . 'Affiliation' . $affiliation['id'],
'<meta name="citation_author_institution" content="' . htmlspecialchars($affiliation['name']) . '"/>'
);
}
}
}

Expand Down