Dear colleagues,
I have a problem with the display of the first page and the last page in the search Crossref. We are seen some OJS the first page and the last page.
For example
My journal
We don’t have “… to …”. How i can change it?
Kind regards,
Artem
There is a larger problem with our compliance with CrossRef’s expectation for page numbering. It is made complex by the large number of plugins which all use the pages field.
* @file plugins/importexport/crossref/classes/CrossRefExportDom.inc.php
/* publisher_item is the article pages */
- if ($article->getPages() != '') {
- $pageNode =& XMLCustomWriter::createElement($doc, 'pages');
- // extract the first page for the first_page element, store the remaining bits in otherPages,
- // after removing any preceding non-numerical characters.
- if (preg_match('/^[^\d]*(\d+)\D*(.*)$/', $article->getPages(), $matches)) {
- $firstPage = $matches[1];
- $otherPages = $matches[2];
+ // CrossRef requires first_page and last_page of any contiguous range, then any other ranges go in other_pages
+ $pages = $article->getPageArray();
+ if (!empty($pages)) {
+ $firstRange = array_shift($pages);
+ $firstPage = array_shift($firstRange);
+ if (count($firstRange)) {
+ // There is a first page and last page for the first range
+ $lastPage = array_shift($firstRange);
+ } else {
+ // There is not a range in the first segment
+ $lastPage = '';
+ }