From 8012b5e8e27f6e6b2d69b37e826dbc0632dd3229 Mon Sep 17 00:00:00 2001 From: Martin Paul Eve Date: Fri, 2 Nov 2012 11:33:11 +0000 Subject: [PATCH] Support for a CLOCKSS manifest --- classes/install/Upgrade.inc.php | 1 + .../form/setup/JournalSetupStep2Form.inc.php | 4 +- locale/en_US/default.xml | 1 + locale/en_US/locale.xml | 4 + locale/en_US/manager.xml | 3 + pages/gateway/GatewayHandler.inc.php | 85 ++++++++++++ pages/gateway/index.php | 1 + plugins/generic/tinymce/TinyMCEPlugin.inc.php | 1 + registry/journalSettings.xml | 4 + templates/about/editorialPolicies.tpl | 11 +- templates/about/index.tpl | 2 +- templates/gateway/clockss.tpl | 126 ++++++++++++++++++ templates/manager/setup/step2.tpl | 14 ++ 13 files changed, 254 insertions(+), 3 deletions(-) create mode 100644 templates/gateway/clockss.tpl diff --git a/classes/install/Upgrade.inc.php b/classes/install/Upgrade.inc.php index fb921eda785..cffbf725e7c 100644 --- a/classes/install/Upgrade.inc.php +++ b/classes/install/Upgrade.inc.php @@ -291,6 +291,7 @@ function localizeJournalSettings() { 'privacyStatement' => 'privacyStatement', 'customAboutItems' => 'customAboutItems', 'lockssLicense' => 'lockssLicense', + 'clockssLicense' => 'clockssLicense', // Setup page 3 'authorGuidelines' => 'authorGuidelines', 'submissionChecklist' => 'submissionChecklist', diff --git a/classes/manager/form/setup/JournalSetupStep2Form.inc.php b/classes/manager/form/setup/JournalSetupStep2Form.inc.php index e7d7c86fb0f..000fb942486 100644 --- a/classes/manager/form/setup/JournalSetupStep2Form.inc.php +++ b/classes/manager/form/setup/JournalSetupStep2Form.inc.php @@ -39,7 +39,9 @@ function JournalSetupStep2Form() { 'privacyStatement' => 'string', 'customAboutItems' => 'object', 'enableLockss' => 'bool', + 'enableClockss' => 'bool', 'lockssLicense' => 'string', + 'clockssLicense' => 'string', 'reviewerDatabaseLinks' => 'object', 'notifyAllAuthorsOnDecision' => 'bool' ) @@ -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'); } /** diff --git a/locale/en_US/default.xml b/locale/en_US/default.xml index ccf8a1ec9ef..6d49fd1244b 100644 --- a/locale/en_US/default.xml +++ b/locale/en_US/default.xml @@ -136,6 +136,7 @@ Please follow the following protocol for making electronic revisions to your man About the Journal page for the journal's section policies, as well as the Author Guidelines. Authors need to register with the journal prior to submitting or, if already registered, can simply log in and begin the five-step process.]]> Open Journal Systems).]]> More...]]> + More...]]> Article Submission diff --git a/locale/en_US/locale.xml b/locale/en_US/locale.xml index 03b238e3b28..89aa357287f 100644 --- a/locale/en_US/locale.xml +++ b/locale/en_US/locale.xml @@ -394,6 +394,10 @@ Note that the OAI interface can be disabled for this site by editing the OJS sys

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:]]> + CLOCKSS (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. +

+Setting up CLOCKSS support for Open Journal Systems does not need to take place until after publishing is fully underway.]]>
+ Proposed Creative Commons Copyright Notices

1. Proposed Policy for Journals That Offer Open Access

diff --git a/locale/en_US/manager.xml b/locale/en_US/manager.xml index c13f7f85694..ffb36a78cdc 100644 --- a/locale/en_US/manager.xml +++ b/locale/en_US/manager.xml @@ -319,6 +319,9 @@ Publisher Manifest page. A LOCKSS license will appear in About the Journal under Archiving:]]> other versions of a LOCKSS license.]]> participating libraries. Use the prepared invitations for (i) libraries participating in LOCKSS or (ii) libraries not yet participating in LOCKSS.]]> + Publisher Manifest page. A CLOCKSS license will appear in About the Journal under Archiving:]]> + other versions of a CLOCKSS license.]]> + the CLOCKSS website.]]> The Look Homepage header, content, journal header, footer, navigation bar, and style sheet. The journal's physical location and mailing address. diff --git a/pages/gateway/GatewayHandler.inc.php b/pages/gateway/GatewayHandler.inc.php index 777ea606a40..806aa580bd7 100644 --- a/pages/gateway/GatewayHandler.inc.php +++ b/pages/gateway/GatewayHandler.inc.php @@ -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. */ diff --git a/pages/gateway/index.php b/pages/gateway/index.php index 6ab7a693e8c..e6d9187f588 100644 --- a/pages/gateway/index.php +++ b/pages/gateway/index.php @@ -18,6 +18,7 @@ switch ($op) { case 'index': case 'lockss': + case 'clockss': case 'plugin': define('HANDLER_CLASS', 'GatewayHandler'); import('pages.gateway.GatewayHandler'); diff --git a/plugins/generic/tinymce/TinyMCEPlugin.inc.php b/plugins/generic/tinymce/TinyMCEPlugin.inc.php index 2d6292641df..ad81f2c8adc 100644 --- a/plugins/generic/tinymce/TinyMCEPlugin.inc.php +++ b/plugins/generic/tinymce/TinyMCEPlugin.inc.php @@ -222,6 +222,7 @@ function getEnableFields(&$templateMgr, $page, $op) { $fields[] = "customAboutItems-$i-content"; } $fields[] = 'lockssLicense'; + $fields[] = 'clockssLicense'; break; case 3: $fields[] = 'authorGuidelines'; diff --git a/registry/journalSettings.xml b/registry/journalSettings.xml index fd0235e7171..0fb73a58ee6 100644 --- a/registry/journalSettings.xml +++ b/registry/journalSettings.xml @@ -78,6 +78,10 @@ lockssLicense {translate key="default.journalSettings.lockssLicense"} + + clockssLicense + {translate key="default.journalSettings.clockssLicense"} + supportedLocales diff --git a/templates/about/editorialPolicies.tpl b/templates/about/editorialPolicies.tpl index 38f2e8f6e06..01af50a2a6e 100644 --- a/templates/about/editorialPolicies.tpl +++ b/templates/about/editorialPolicies.tpl @@ -20,7 +20,7 @@ {if $currentJournal->getSetting('publishingMode') == $smarty.const.PUBLISHING_MODE_OPEN && $currentJournal->getLocalizedSetting('openAccessPolicy') != ''}
  • » {translate key="about.openAccessPolicy"}
  • {/if} {if $currentJournal->getSetting('publishingMode') == $smarty.const.PUBLISHING_MODE_SUBSCRIPTION && $currentJournal->getSetting('enableAuthorSelfArchive')}
  • » {translate key="about.authorSelfArchive"}
  • {/if} {if $currentJournal->getSetting('publishingMode') == $smarty.const.PUBLISHING_MODE_SUBSCRIPTION && $currentJournal->getSetting('enableDelayedOpenAccess')}
  • » {translate key="about.delayedOpenAccess"}
  • {/if} - {if $currentJournal->getSetting('enableLockss') && $currentJournal->getLocalizedSetting('lockssLicense') != ''}
  • » {translate key="about.archiving"}
  • {/if} + {if $currentJournal->getSetting('enableLockss') || $journalSettings.enableClockss && $currentJournal->getLocalizedSetting('lockssLicense') != ''}
  • » {translate key="about.archiving"}
  • {/if} {foreach key=key from=$currentJournal->getLocalizedSetting('customAboutItems') item=customAboutItem} {if !empty($customAboutItem.title)}
  • » {$customAboutItem.title|escape}
  • @@ -115,6 +115,15 @@ {if $currentJournal->getSetting('enableLockss') && $currentJournal->getLocalizedSetting('lockssLicense') != ''}

    {translate key="about.archiving"}

    {$currentJournal->getLocalizedSetting('lockssLicense')|nl2br}

    +{if $currentJournal->getSetting('enableClockss') && $currentJournal->getLocalizedSetting('clockssLicense') != ''} +
     
    +

    {$currentJournal->getLocalizedSetting('clockssLicense')|nl2br}

    +{/if} +
     
    +
    +{else if $currentJournal->getSetting('enableClockss') && $currentJournal->getLocalizedSetting('clockssLicense') != ''} +

    {translate key="about.archiving"}

    +

    {$currentJournal->getLocalizedSetting('clockssLicense')|nl2br}

     
    diff --git a/templates/about/index.tpl b/templates/about/index.tpl index 10575edc21e..bd98fe8c9dd 100644 --- a/templates/about/index.tpl +++ b/templates/about/index.tpl @@ -32,7 +32,7 @@ {if $currentJournal->getLocalizedSetting('reviewPolicy') != ''}
  • » {translate key="about.peerReviewProcess"}
  • {/if} {if $currentJournal->getLocalizedSetting('pubFreqPolicy') != ''}
  • » {translate key="about.publicationFrequency"}
  • {/if} {if $currentJournal->getSetting('publishingMode') == $smarty.const.PUBLISHING_MODE_OPEN && $currentJournal->getLocalizedSetting('openAccessPolicy') != ''}
  • » {translate key="about.openAccessPolicy"}
  • {/if} - {if $journalSettings.enableLockss && $currentJournal->getLocalizedSetting('lockssLicense') != ''}
  • » {translate key="about.archiving"}
  • {/if} + {if $journalSettings.enableLockss || $journalSettings.enableClockss && $currentJournal->getLocalizedSetting('lockssLicense') != ''}
  • » {translate key="about.archiving"}
  • {/if} {if $paymentConfigured && $journalSettings.journalPaymentsEnabled && $journalSettings.membershipFeeEnabled && $journalSettings.membershipFee > 0}
  • » {translate key="about.memberships"}
  • {/if} {if $currentJournal->getSetting('publishingMode') == $smarty.const.PUBLISHING_MODE_SUBSCRIPTION}
  • » {translate key="about.subscriptions"}
  • diff --git a/templates/gateway/clockss.tpl b/templates/gateway/clockss.tpl new file mode 100644 index 00000000000..968b818a3ba --- /dev/null +++ b/templates/gateway/clockss.tpl @@ -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} +

    Archive of Published Issues

    + + +{else} + +

    {if $prevYear !== null}<< Previous{else}<< Previous{/if} | {if $nextYear !== null}Next >>{else}Next >>{/if}

    + +

    Archive of Published Issues: {$year|escape}

    + + + +{if $showInfo} +
    + +
    + +

    Front Matter

    + +

    Front Matter associated with this Archival Unit includes:

    + + + +
    + +
    + +

    Metadata

    + +

    Metadata associated with this Archival Unit includes:

    + + + + + + + + + + + + + + + + + + + + + + +{if $journal->getSetting('issn')} + + + + +{/if} + + + + + + + + +{if $journal->getLocalizedSetting('copyrightNotice')} + + + + +{/if} +{if $journal->getLocalizedSetting('openAccessPolicy')} + + + + +{/if} +
    Journal URL{$journal->getUrl()|escape}
    Title{$journal->getLocalizedTitle()|escape}
    Publisher{$journal->getSetting('publisherInstitution')|escape}
    Description{$journal->getLocalizedSetting('searchDescription')|escape}
    Keywords{$journal->getLocalizedSetting('searchKeywords')|escape}
    ISSN{$journal->getSetting('issn')|escape}
    Language(s){foreach from=$locales key=localeKey item=localeName}{$localeName|escape} ({$localeKey|escape})
    {/foreach}
    Publisher Email{mailto address=$journal->getSetting('contactEmail')|escape encode="hex"}
    Copyright{$journal->getLocalizedSetting('copyrightNotice')|nl2br}
    Rights{$journal->getLocalizedSetting('openAccessPolicy')|nl2br}
    +{/if} + +{/if} + +

    + +
    + CLOCKSS +
    + clockss system has permission to collect, preserve, and serve this Archival Unit. + +

    + + The Public Knowledge Project +
    + Open Journal Systems was developed by the Public Knowledge Project. +
    + +{include file="common/footer.tpl"} + diff --git a/templates/manager/setup/step2.tpl b/templates/manager/setup/step2.tpl index 4d3160cea13..978c125ef29 100644 --- a/templates/manager/setup/step2.tpl +++ b/templates/manager/setup/step2.tpl @@ -232,6 +232,20 @@

    +

    {translate key="manager.setup.clockssDescription"}

    + +

    {translate key="manager.setup.clockssRegister"}

    + +{url|assign:"clockssUrl" page="gateway" op="clockss"} +

    + +

    + +
    + {translate key="manager.setup.clockssLicenses"} +

    + +