OHS - I need to edit a record template

Is it possible to edit a template to split realy urls from other identifiers?

I have dc.identifier.isbn, dc.identifier,citation and dc.identifier.uri. And all of ti are identifiers in OAI. In OHS i have links like this - http://myhostnam/5-7996-0324-9

it is not very good.

Hi @IdeaFix,

Are you wondering about the presentation of the record in the record lists, or the page presenting the full record? The templates for those are plugins/schemas/dc/summary.tpl and plugins/schemas/dc/record.tpl, respectively (assuming you’re using the Dublin Core metadata format).

Alec Smecher
Public Knowledge Project Team

Hi. I will try to modify templates, but now I try ti use “processor plugins”.

I have a problem to use “git version”, it does not works, and I can not use this patch to 2.3.2 release.

Hi @IdeaFix,

You should be able to apply that patch from within the lib/pkp subdirectory.

Alec Smecher
Public Knowledge Project Team

Thank you! I try to use [ohs]/templates…

Is it possible to “build” a tar.gz file from git + all patches? I try to use it, but get an error (DB Error: Duplicate entry ‘67’ for key ‘sessions_pkey’).

Hi @IdeaFix,

I’d suggest sticking with the stable release. Is there a feature in the git repository that’s not in that release?

Alec Smecher
Public Knowledge Project Team

I try to compare git and release vresions - pkp-lib have many different things.

harvester also have difference, for example “controllers” and “js” folders. I try to combine this two sources. For example, this file is very usefull, but it have zero size in release.

All recomended patches are allready applied in git. It will be usefull to make may be not new release, but some kind of rollup.

Hi @IdeaFix,

Have you looked at the ohs-stable-2_3 branch (both for harvester and lib/pkp repositories)? That ought to be stabler than other mixes.

Alec Smecher
Public Knowledge Project Team

Ok. I will try this branch. But template is the main problem.

For example this record - Просмотреть запись

There is 3 identifiers on it. But only one real link. I look at /plugins/schemas/dc/DublinCorePlugin.inc.php.

There is a url check on it (string 118-120) but it does not work!

Hi @IdeaFix,

Have you looked at the templates I suggested earlier?

Alec Smecher
Public Knowledge Project Team

Yes, I look at the templates, but I do not understand how to split irls from other identifiers :frowning:

Can you help me with downloading 2.3.2 stable branch of pkp-lib? I have shell and git. I make this commands:
git clone https://github.com/pkp/harvester.git harvester
cd harvester
git submodule update --init --recursive

But something goes wrong and harvester does not work.

Now I see an error in stable tar.gz - Поиск

<td class="value"<select name="field-7-toMonth" class="selectMenu">

Wich template should I edit?

I found it!

/plugins/generic/mysqlIndex/search.tpl 30-31 strings. Missing “>” symbol.

I found the code in plugins/schemas/dc/record.tpl

{foreach from=$entry item=value}
{if $name == ‘identifier’}
<a href="{$value|escape}">{$value|escape|default:"—"}</a>

Can anyone help me to add a check of identifier? I neet to check URLs and NOT_URLs in the identifier.

The code should be not very hard, something about this:

if (preg_match(’/^(https?://)?([\w.]+).([a-z]{2,6}.?)(/[\w.])/?$/’, …

But I know nothing about coding on this framework.

I make a temporery desision of my promlem - Просмотреть запись

All identifiers are not URLS + Link to original on the top of the page. But it will be good to make clickable identifiers on the body.

I make a javascript filter for urls. It is working fine - Просмотреть запись (example) but the source code is ugly.

Can anyone make it on php/smarty?

Hi @IdeaFix,

To use preg_match in Smarty, you can follow this example:

Alec Smecher
Public Knowledge Project Team


I found a php developer and he helps me to make all I need.

Example1 - Просмотреть запись now I can show coar metadata registry values.
Example2 - Просмотреть запись now I can make urls not only in “identifiers”.

I want to make such things for ISSN, ISBN and may be some other regular expressions. But now I want to explore preprocessor plugins and after that make something own, If preprocessor plugins will not solve my problems.