Skip to content

Commit

Permalink
Support for a CLOCKSS manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Paul Eve committed Nov 2, 2012
1 parent 4cc99de commit 8012b5e
Show file tree
Hide file tree
Showing 13 changed files with 254 additions and 3 deletions.
1 change: 1 addition & 0 deletions classes/install/Upgrade.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ function localizeJournalSettings() {
'privacyStatement' => 'privacyStatement',
'customAboutItems' => 'customAboutItems',
'lockssLicense' => 'lockssLicense',
'clockssLicense' => 'clockssLicense',
// Setup page 3
'authorGuidelines' => 'authorGuidelines',
'submissionChecklist' => 'submissionChecklist',
Expand Down
4 changes: 3 additions & 1 deletion classes/manager/form/setup/JournalSetupStep2Form.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ function JournalSetupStep2Form() {
'privacyStatement' => 'string',
'customAboutItems' => 'object',
'enableLockss' => 'bool',
'enableClockss' => 'bool',
'lockssLicense' => 'string',
'clockssLicense' => 'string',
'reviewerDatabaseLinks' => 'object',
'notifyAllAuthorsOnDecision' => 'bool'
)
Expand All @@ -53,7 +55,7 @@ function JournalSetupStep2Form() {
* @return array
*/
function getLocaleFieldNames() {
return array('focusScopeDesc', 'reviewPolicy', 'reviewGuidelines', 'privacyStatement', 'customAboutItems', 'lockssLicense');
return array('focusScopeDesc', 'reviewPolicy', 'reviewGuidelines', 'privacyStatement', 'customAboutItems', 'lockssLicense', 'clockssLicense');
}

/**
Expand Down
1 change: 1 addition & 0 deletions locale/en_US/default.xml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ Please follow the following protocol for making electronic revisions to your man
<message key="default.journalSettings.forAuthors"><![CDATA[Interested in submitting to this journal? We recommend that you review the <a href="{$indexUrl}/{$journalPath}/about">About the Journal</a> page for the journal's section policies, as well as the <a href="{$indexUrl}/{$journalPath}/about/submissions#authorGuidelines">Author Guidelines</a>. Authors need to <a href="{$indexUrl}/{$journalPath}/user/register">register</a> with the journal prior to submitting or, if already registered, can simply <a href="{$indexUrl}/index/login">log in</a> and begin the five-step process.]]></message>
<message key="default.journalSettings.forLibrarians"><![CDATA[We encourage research librarians to list this journal among their library's electronic journal holdings. As well, it may be worth noting that this journal's open source publishing system is suitable for libraries to host for their faculty members to use with journals they are involved in editing (see <a href="http://pkp.sfu.ca/ojs">Open Journal Systems</a>).]]></message>
<message key="default.journalSettings.lockssLicense"><![CDATA[This journal utilizes the LOCKSS system to create a distributed archiving system among participating libraries and permits those libraries to create permanent archives of the journal for purposes of preservation and restoration. <a href="http://lockss.org/">More...</a>]]></message>
<message key="default.journalSettings.clockssLicense"><![CDATA[This journal utilizes the CLOCKSS system to create a distributed archiving system among participating libraries and permits those libraries to create permanent archives of the journal for purposes of preservation and restoration. <a href="http://clockss.org/">More...</a>]]></message>

<!-- Default settings for payment items. -->
<message key="default.journalSettings.submissionFee">Article Submission</message>
Expand Down
4 changes: 4 additions & 0 deletions locale/en_US/locale.xml
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,10 @@ Note that the OAI interface can be disabled for this site by editing the OJS sys
<br /><br />
Setting up LOCKSS support for Open Journal Systems does not need to take place until after publishing is fully underway, at which point follow these two steps:]]></message>

<message key="manager.setup.clockssDescription"><![CDATA[Open Journal Systems also supports the <a href="http://clockss.org/" target="_blank">CLOCKSS</a> (Controlled Lots of Copies Keep Stuff Safe) system to ensure a secure and permanent archive for the journal. CLOCKSS is based upon the open source LOCKSS software developed at Stanford University Library that enables libraries to preserve selected web journals by regularly polling registered journal websites for newly published content and archiving it. Each archive is continually validated against other library caches, and if content is found to be corrupted or lost, the other caches or the journal is used to restore it.
<br /><br />
Setting up CLOCKSS support for Open Journal Systems does not need to take place until after publishing is fully underway.]]></message>

<!-- Setup Step 3 -->
<message key="manager.setup.authorCopyrightNotice.sample"><![CDATA[<h3>Proposed Creative Commons Copyright Notices</h3>
<h4>1. Proposed Policy for Journals That Offer Open Access</h4>
Expand Down
3 changes: 3 additions & 0 deletions locale/en_US/manager.xml
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,9 @@
<message key="manager.setup.lockssEnable"><![CDATA[Enable LOCKSS to store and distribute journal content at participating libraries via a LOCKSS <a href="{$lockssUrl}" target="_blank">Publisher Manifest</a> page. A LOCKSS license will appear in About the Journal under Archiving:]]></message>
<message key="manager.setup.lockssLicenses"><![CDATA[See <a href="http://lockss.org/lockss/Publishers_and_Titles" target="_blank">other versions of a LOCKSS license</a>.]]></message>
<message key="manager.setup.lockssRegister"><![CDATA[Identify 6-10 libraries that will register and cache the journal. For example, turn to institutions where editors or Board members work and/or institutions already participating in LOCKSS. See <a href="http://lockss.org/lockss/Libraries" target="_blank">participating libraries</a>. Use the prepared invitations for (i) <a href="{$lockssExistingArchiveUrl}" target="_blank">libraries participating in LOCKSS</a> or (ii) <a href="{$lockssNewArchiveUrl}" target="_blank">libraries not yet participating in LOCKSS</a>.]]></message>
<message key="manager.setup.clockssEnable"><![CDATA[Enable CLOCKSS to store and distribute journal content at participating libraries via a CLOCKSS <a href="{$clockssUrl}" target="_blank">Publisher Manifest</a> page. A CLOCKSS license will appear in About the Journal under Archiving:]]></message>
<message key="manager.setup.clockssLicenses"><![CDATA[See <a href="http://clockss.org/" target="_blank">other versions of a CLOCKSS license</a>.]]></message>
<message key="manager.setup.clockssRegister"><![CDATA[Sign up for the CLOCKSS service by visiting <a href="http://clockss.org/" target="_blank">the CLOCKSS website</a>.]]></message>
<message key="manager.setup.look">The Look</message>
<message key="manager.setup.look.description">Homepage header, content, journal header, footer, navigation bar, and style sheet.</message>
<message key="manager.setup.mailingAddressDescription">The journal's physical location and mailing address.</message>
Expand Down
85 changes: 85 additions & 0 deletions pages/gateway/GatewayHandler.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,91 @@ function lockss($args, $request) {
$templateMgr->display('gateway/lockss.tpl');
}

function clockss($args, $request) {
$this->validate();
$this->setupTemplate();

$journal =& $request->getJournal();
$templateMgr =& TemplateManager::getManager();

if ($journal != null) {
if (!$journal->getSetting('enableClockss')) {
$request->redirect(null, 'index');
}

$year = $request->getUserVar('year');

$issueDao =& DAORegistry::getDAO('IssueDAO');

// FIXME Should probably go in IssueDAO or a subclass
if (isset($year)) {
$year = (int)$year;
$result =& $issueDao->retrieve(
'SELECT * FROM issues WHERE journal_id = ? AND year = ? AND published = 1 ORDER BY current DESC, year ASC, volume ASC, number ASC',
array($journal->getId(), $year)
);
if ($result->RecordCount() == 0) {
unset($year);
}
}

if (!isset($year)) {
$showInfo = true;
$result =& $issueDao->retrieve(
'SELECT MAX(year) FROM issues WHERE journal_id = ? AND published = 1',
$journal->getId()
);
list($year) = $result->fields;
$result =& $issueDao->retrieve(
'SELECT * FROM issues WHERE journal_id = ? AND year = ? AND published = 1 ORDER BY current DESC, year ASC, volume ASC, number ASC',
array($journal->getId(), $year)
);
} else {
$showInfo = false;
}

$issues = new DAOResultFactory($result, $issueDao, '_returnIssueFromRow');

$prevYear = null;
$nextYear = null;
if (isset($year)) {
$result =& $issueDao->retrieve(
'SELECT MAX(year) FROM issues WHERE journal_id = ? AND published = 1 AND year < ?',
array($journal->getId(), $year)
);
list($prevYear) = $result->fields;

$result =& $issueDao->retrieve(
'SELECT MIN(year) FROM issues WHERE journal_id = ? AND published = 1 AND year > ?',
array($journal->getId(), $year)
);
list($nextYear) = $result->fields;
}

$templateMgr->assign_by_ref('journal', $journal);
$templateMgr->assign_by_ref('issues', $issues);
$templateMgr->assign('year', $year);
$templateMgr->assign('prevYear', $prevYear);
$templateMgr->assign('nextYear', $nextYear);
$templateMgr->assign('showInfo', $showInfo);

$locales =& $journal->getSupportedLocaleNames();
if (!isset($locales) || empty($locales)) {
$localeNames =& AppLocale::getAllLocales();
$primaryLocale = AppLocale::getPrimaryLocale();
$locales = array($primaryLocale => $localeNames[$primaryLocale]);
}
$templateMgr->assign_by_ref('locales', $locales);

} else {
$journalDao =& DAORegistry::getDAO('JournalDAO');
$journals =& $journalDao->getJournals(true);
$templateMgr->assign_by_ref('journals', $journals);
}

$templateMgr->display('gateway/clockss.tpl');
}

/**
* Handle requests for gateway plugins.
*/
Expand Down
1 change: 1 addition & 0 deletions pages/gateway/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
switch ($op) {
case 'index':
case 'lockss':
case 'clockss':
case 'plugin':
define('HANDLER_CLASS', 'GatewayHandler');
import('pages.gateway.GatewayHandler');
Expand Down
1 change: 1 addition & 0 deletions plugins/generic/tinymce/TinyMCEPlugin.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ function getEnableFields(&$templateMgr, $page, $op) {
$fields[] = "customAboutItems-$i-content";
}
$fields[] = 'lockssLicense';
$fields[] = 'clockssLicense';
break;
case 3:
$fields[] = 'authorGuidelines';
Expand Down
4 changes: 4 additions & 0 deletions registry/journalSettings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@
<name>lockssLicense</name>
<value>{translate key="default.journalSettings.lockssLicense"}</value>
</setting>
<setting type="string" locale="1">
<name>clockssLicense</name>
<value>{translate key="default.journalSettings.clockssLicense"}</value>
</setting>
<setting type="object" locale="0">
<name>supportedLocales</name>
<value>
Expand Down
11 changes: 10 additions & 1 deletion templates/about/editorialPolicies.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
{if $currentJournal->getSetting('publishingMode') == $smarty.const.PUBLISHING_MODE_OPEN && $currentJournal->getLocalizedSetting('openAccessPolicy') != ''}<li>&#187; <a href="{url op="editorialPolicies" anchor="openAccessPolicy"}">{translate key="about.openAccessPolicy"}</a></li>{/if}
{if $currentJournal->getSetting('publishingMode') == $smarty.const.PUBLISHING_MODE_SUBSCRIPTION && $currentJournal->getSetting('enableAuthorSelfArchive')}<li>&#187; <a href="{url op="editorialPolicies" anchor="authorSelfArchivePolicy"}">{translate key="about.authorSelfArchive"}</a></li>{/if}
{if $currentJournal->getSetting('publishingMode') == $smarty.const.PUBLISHING_MODE_SUBSCRIPTION && $currentJournal->getSetting('enableDelayedOpenAccess')}<li>&#187; <a href="{url op="editorialPolicies" anchor="delayedOpenAccessPolicy"}">{translate key="about.delayedOpenAccess"}</a></li>{/if}
{if $currentJournal->getSetting('enableLockss') && $currentJournal->getLocalizedSetting('lockssLicense') != ''}<li>&#187; <a href="{url op="editorialPolicies" anchor="archiving"}">{translate key="about.archiving"}</a></li>{/if}
{if $currentJournal->getSetting('enableLockss') || $journalSettings.enableClockss && $currentJournal->getLocalizedSetting('lockssLicense') != ''}<li>&#187; <a href="{url op="editorialPolicies" anchor="archiving"}">{translate key="about.archiving"}</a></li>{/if}
{foreach key=key from=$currentJournal->getLocalizedSetting('customAboutItems') item=customAboutItem}
{if !empty($customAboutItem.title)}
<li>&#187; <a href="{url op="editorialPolicies" anchor=custom-$key}">{$customAboutItem.title|escape}</a></li>
Expand Down Expand Up @@ -115,6 +115,15 @@
{if $currentJournal->getSetting('enableLockss') && $currentJournal->getLocalizedSetting('lockssLicense') != ''}
<div id="archiving"><h3>{translate key="about.archiving"}</h3>
<p>{$currentJournal->getLocalizedSetting('lockssLicense')|nl2br}</p>
{if $currentJournal->getSetting('enableClockss') && $currentJournal->getLocalizedSetting('clockssLicense') != ''}
<div class="separator">&nbsp;</div>
<p>{$currentJournal->getLocalizedSetting('clockssLicense')|nl2br}</p>
{/if}
<div class="separator">&nbsp;</div>
</div>
{else if $currentJournal->getSetting('enableClockss') && $currentJournal->getLocalizedSetting('clockssLicense') != ''}
<div id="archiving"><h3>{translate key="about.archiving"}</h3>
<p>{$currentJournal->getLocalizedSetting('clockssLicense')|nl2br}</p>

<div class="separator">&nbsp;</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion templates/about/index.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
{if $currentJournal->getLocalizedSetting('reviewPolicy') != ''}<li>&#187; <a href="{url op="editorialPolicies" anchor="peerReviewProcess"}">{translate key="about.peerReviewProcess"}</a></li>{/if}
{if $currentJournal->getLocalizedSetting('pubFreqPolicy') != ''}<li>&#187; <a href="{url op="editorialPolicies" anchor="publicationFrequency"}">{translate key="about.publicationFrequency"}</a></li>{/if}
{if $currentJournal->getSetting('publishingMode') == $smarty.const.PUBLISHING_MODE_OPEN && $currentJournal->getLocalizedSetting('openAccessPolicy') != ''}<li>&#187; <a href="{url op="editorialPolicies" anchor="openAccessPolicy"}">{translate key="about.openAccessPolicy"}</a></li>{/if}
{if $journalSettings.enableLockss && $currentJournal->getLocalizedSetting('lockssLicense') != ''}<li>&#187; <a href="{url op="editorialPolicies" anchor="archiving"}">{translate key="about.archiving"}</a></li>{/if}
{if $journalSettings.enableLockss || $journalSettings.enableClockss && $currentJournal->getLocalizedSetting('lockssLicense') != ''} <li>&#187; <a href="{url op="editorialPolicies" anchor="archiving"}">{translate key="about.archiving"}</a></li>{/if}
{if $paymentConfigured && $journalSettings.journalPaymentsEnabled && $journalSettings.membershipFeeEnabled && $journalSettings.membershipFee > 0}<li>&#187; <a href="{url op="memberships"}">{translate key="about.memberships"}</a></li>{/if}
{if $currentJournal->getSetting('publishingMode') == $smarty.const.PUBLISHING_MODE_SUBSCRIPTION}
<li>&#187; <a href="{url op="subscriptions"}">{translate key="about.subscriptions"}</a></li>
Expand Down
126 changes: 126 additions & 0 deletions templates/gateway/clockss.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
{**
* templates/gateway/clockss.tpl
*
* Copyright (c) 2003-2012 John Willinsky, Martin Paul Eve
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
* CLOCKSS Publisher Manifest gateway page.
* NOTE: This page is not localized in order to provide a consistent interface to CLOCKSS across all OJS installations. It is not meant to be accessed by humans.
*
*}
{strip}
{assign var="pageTitleTranslated" value="CLOCKSS Publisher Manifest"}
{include file="common/header.tpl"}
{/strip}

{if $journals}
<h3>Archive of Published Issues</h3>

<ul>
{iterate from=journals item=journal}
{if $journal->getSetting('enableClockss')}<li><a href="{url journal=$journal->getPath() page="gateway" op="clockss"}">{$journal->getLocalizedTitle()|escape}</a></li>{/if}
{/iterate}
</ul>
{else}

<p>{if $prevYear !== null}<a href="{url op="clockss" year=$prevYear}" class="action">&lt;&lt; Previous</a>{else}<span class="disabled heading">&lt;&lt; Previous</span>{/if} | {if $nextYear !== null}<a href="{url op="clockss" year=$nextYear}" class="action">Next &gt;&gt;</a>{else}<span class="disabled heading">Next &gt;&gt;</span>{/if}</p>

<h3>Archive of Published Issues: {$year|escape}</h3>

<ul>
{iterate from=issues item=issue}
<li><a href="{url page="issue" op="view" path=$issue->getBestIssueId($journal)}">{$issue->getIssueIdentification()|strip_unsafe_html|nl2br}</a></li>
{/iterate}
</ul>

{if $showInfo}
<br />

<div class="separator"></div>

<h3>Front Matter</h3>

<p>Front Matter associated with this Archival Unit includes:</p>

<ul>
<li><a href="{url page="about"}">About the Journal</a></li>
<li><a href="{url page="about" op="submissions"}">Submission Guidelines</a></li>
<li><a href="{url page="about" op="contact"}">Contact Information</a></li>
</ul>

<br />

<div class="separator"></div>

<h3>Metadata</h3>

<p>Metadata associated with this Archival Unit includes:</p>

<table width="100%" class="data">
<tr valign="top">
<td width="20%" class="label">Journal URL</td>
<td width="80%" class="value"><a href="{$journal->getUrl()|escape}">{$journal->getUrl()|escape}</a></td>
</tr>
<tr valign="top">
<td class="label">Title</td>
<td class="value">{$journal->getLocalizedTitle()|escape}</td>
</tr>
<tr valign="top">
<td class="label">Publisher</td>
<td class="value"><a href="{$journal->getSetting('publisherUrl')|escape}">{$journal->getSetting('publisherInstitution')|escape}</a></td>
</tr>
<tr valign="top">
<td class="label">Description</td>
<td class="value">{$journal->getLocalizedSetting('searchDescription')|escape}</td>
</tr>
<tr valign="top">
<td class="label">Keywords</td>
<td class="value">{$journal->getLocalizedSetting('searchKeywords')|escape}</td>
</tr>
{if $journal->getSetting('issn')}
<tr valign="top">
<td class="label">ISSN</td>
<td class="value">{$journal->getSetting('issn')|escape}</td>
</tr>
{/if}
<tr valign="top">
<td class="label">Language(s)</td>
<td class="value">{foreach from=$locales key=localeKey item=localeName}{$localeName|escape} ({$localeKey|escape})<br />{/foreach}</td>
</tr>
<tr valign="top">
<td class="label">Publisher Email</td>
<td class="value">{mailto address=$journal->getSetting('contactEmail')|escape encode="hex"}</td>
</tr>
{if $journal->getLocalizedSetting('copyrightNotice')}
<tr valign="top">
<td class="label">Copyright</td>
<td class="value">{$journal->getLocalizedSetting('copyrightNotice')|nl2br}</td>
</tr>
{/if}
{if $journal->getLocalizedSetting('openAccessPolicy')}
<tr valign="top">
<td class="label">Rights</td>
<td class="value">{$journal->getLocalizedSetting('openAccessPolicy')|nl2br}</td>
</tr>
{/if}
</table>
{/if}

{/if}

<br /><br />

<div style="text-align: center; width: 250px; margin: 0 auto">
<a href="http://clockss.org/"><img src="http://board.clockss.org/images/clockss_logo_114x110.jpg" style="border: 0;" alt="CLOCKSS" /></a>
<br />
clockss system has permission to collect, preserve, and serve this Archival Unit.

<br /><br />

<a href="http://pkp.sfu.ca/"><img src="{$baseUrl}/lib/pkp/templates/images/pkp.gif" style="border: 0;" alt="The Public Knowledge Project" /></a>
<br />
Open Journal Systems was developed by the Public Knowledge Project.
</div>

{include file="common/footer.tpl"}

14 changes: 14 additions & 0 deletions templates/manager/setup/step2.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,20 @@
</p>
</div>
<p>{translate key="manager.setup.clockssDescription"}</p>
<p>{translate key="manager.setup.clockssRegister"}</p>
{url|assign:"clockssUrl" page="gateway" op="clockss"}
<p><input type="checkbox" name="enableClockss" id="enableClockss" value="1"{if $enableClockss} checked="checked"{/if} /> <label for="enableClockss">{translate key="manager.setup.clockssEnable" clockssUrl=$clockssUrl}</label></p>
<p>
<textarea name="clockssLicense[{$formLocale|escape}]" id="clockssLicense" rows="6" cols="60" class="textArea">{$clockssLicense[$formLocale]|escape}</textarea>
<br />
<span class="instruct">{translate key="manager.setup.clockssLicenses"}</span>
</p>
</div>
<div class="separator"></div>
<div id="reviewerDatabaseLink">
Expand Down

0 comments on commit 8012b5e

Please sign in to comment.