OJS OCS OMP OHS

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
Developer Resources:

Documentation: The OJS Technical Reference and the OJS API Reference are both available from the OJS Documentation page.

Git: You can access our public Git Repository here. Comprehensive Git usage instructions are available on the wiki.

Bugzilla: You can access our Bugzilla report tracker here.

Search: You can use our Google Custom Search to search across our main website, the support forum, and Bugzilla.

Questions and discussion are welcome, but if you have a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a technical support question, try the OJS Technical Support subforum.

Add year suffix for DOIs in step 1 of Setup

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

Hi,

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;
break;
default:


All best,

Vanessa Gabler
vgabler
 
Posts: 95
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.

Cheers,
James
jmacgreg
 
Posts: 4190
Joined: Tue Feb 14, 2006 10:50 am


Return to OJS Development

Who is online

Users browsing this forum: No registered users and 1 guest