OpenAIRE plugin improved (OJS 2.4.8)


We proceeded to add some features to OpenAire plugin for OJS 2.4.x.

What we have changed is :

  • add new specific OpenAire metadata like project title, funder and funding program;
  • search for the metadata information space of OpenAIRE through HTTP API;
  • fill automatically edit form

If anyone is interested can view and download it from this link


1 Like

hello @atarix how do I install the plugin in my ojs 2.4.8? Please do you step instruccions to install ?


hi @cristianviza

to install the plugin follow this simple steps :

  • Copy the source into the OJS’s plugins/generic/openAIRE folder.
  • Run tools/upgrade.php upgrade to allow the system to recognize the new plugin.
  • Enable this plugin within the administration interface.

hello @atarix. Thanks for your reply.
I investigate your modified plugin and the default openAIRE because I trying to build a side-wide plugin that adds a new set (I want that set filter only some items). I modified default OpenAIRE plugin with my SET and when I apply the plugin inside a magazine filters correctly maked articles in the Journal. Works excellent.
In next step I went transform a side-wide plugin (I want apply the filtering regardless of the journal). My modified OpenAire (add: function isSitePlugin and update its entry in the versions table, as asmecher recommended).
Now my set appear in site-wide ListSets → http://XXXXXX/ojs248/index.php/index/oai?verb=ListSets
but I when filter with my set return : noRecordsMatch->No matching records in this repository

I think my problem is that my site-wide plugin looks for a journal name index but it does not find any.
I think there are two functions handle the return records:
1.function recordsOrIdentifiers($hookName, $params) → (
2. function &getOpenSNRDRecordsOrIdentifiers($setIds, $from, $until, $offset, $limit, &$total, $funcName) →

I don’t understand which I should modify to set in parameters all the journal of the system.

I hope you understand my explanation any suggestions are welcome.


Hi @cristianviza

Have you add the hook for retrieving OAI records or identifiers for the new set?
Look at these lines in OpenAIRE plugin

And this is the function that handles the return of the records :

hi @atarix. Thanks for your response

Yes I have this functions.
I explain
I have several jounals: example:
journals_ids= 73 (name: Test1), 72 (name:test2) , 65 (name:test3), 64 (name:test4), etc… and OJS by default includes sets for each journal and each journal section, but I need a site-wide set. My OpenSnrdplugin work fine within web each Journal
https://localhost/index.php/test1/oai?verb=ListIdentifiers&metadataPrefix=oai_dc&set=snrd → return 3 records .
https://localhost/index.php/test2/oai?verb=ListIdentifiers&metadataPrefix=oai_dc&set=snrd → return 1 records
https://localhost/index.php/test3/oai?verb=ListIdentifiers&metadataPrefix=oai_dc&set=snrd → return 0 records .
https://localhost/index.php/test4/oai?verb=ListIdentifiers&metadataPrefix=oai_dc&set=snrd → return 2 records

Total: 6 records
but I get problem when y execute my plugin as a side-wide (I transform my plugin in a side-wide add a isSitePlugin function in my plugin class and update entry in the versions table (the sitewide=1 column)). Does not return any records
Example side-wide url:
https://localhost/index.php/index/oai?verb=ListIdentifiers&metadataPrefix=oai_dc&set=snrd → return 0 recods
I want the plugin returned 6 records

In function recordsOrIdentifiers($hookName, $params) line 252,253

take the id of a single journal. I can pass to that function the list of ids of all the journals of that way I return all the records? or I’m wrong?


Hi @cristianviza

if you use https://localhost/index.php/index/oai you have to check if your plugin is enabled with the journal that has id 0.

You could use this query to see for which journal is enabled your plugin

SELECT plugin_name, locale, journal_id, setting_name, setting_value, setting_type
FROM public.plugin_settings
WHERE plugin_name = 'YOURPLUGIN' AND setting_name = 'enabled';