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

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.
Posts: 96
Joined: Thu Feb 18, 2010 1:22 pm

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:
*** Tue Nov 9 15:15:12 2010
--- 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: 4191
Joined: Tue Feb 14, 2006 10:50 am

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: 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.


Return to “OJS Development”

Who is online

Users browsing this forum: No registered users and 2 guests