You are viewing the PKP Support Forum | PKP Home Wiki

Add year suffix for DOIs in step 1 of Setup

OJS development discussion, enhancement requests, third-party patches and plug-ins.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
The Public Knowledge Project Support Forum is moving to http://forum.pkp.sfu.ca

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.

Add year suffix for DOIs in step 1 of Setup

Postby vgabler » Tue Nov 09, 2010 1:50 pm


I see that others have posted here about how to add the option "year" to the suffix of DOIs. However, I didn't see any requests that this automatically be included as an option in a future version. In case it helps, here was our System Admin's fix:

In the directory classes/article:
*** PublishedArticle.inc.php.orig Tue Nov 9 15:15:12 2010
--- PublishedArticle.inc.php Tue Nov 9 15:38:38 2010
*** 288,293 ****
--- 288,295 ----
$suffixPattern = String::regexp_replace('/%a/', $this->getArticleId(), $suffixPattern);
// %p - page number
$suffixPattern = String::regexp_replace('/%p/', $this->getPages(), $suffixPattern);
+ // %Y - year
+ $suffixPattern = String::regexp_replace('/%Y/', $issue->getYear(), $suffixPattern);
$doi = $doiPrefix . '/' . $suffixPattern;

All best,

Vanessa Gabler
Posts: 96
Joined: Thu Feb 18, 2010 1:22 pm

Re: Add year suffix for DOIs in step 1 of Setup

Postby jmacgreg » Thu Nov 11, 2010 3:44 pm

Hi Vanessa,

I've posted a fix for this here: http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=6155. You may want to have your sysadmin (Brian, correct?) take a look at the fix, as I did add some instructions to a locale key so that Journal Managers know the year option exists when they set up their custom DOIs. Any further comments are appreciated. I'll be posting a report on making DOIs visible in the near future.

Posts: 4191
Joined: Tue Feb 14, 2006 10:50 am

Return to OJS Development

Who is online

Users browsing this forum: No registered users and 0 guests