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 http://XXXXXX/ojs248/index.php/index/oai?verb=ListIdentifiers&metadataPrefix=oai_dc&set=snrd
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) → (OpenSNRDPlugin.inc.php)
2. function &getOpenSNRDRecordsOrIdentifiers($setIds, $from, $until, $offset, $limit, &$total, $funcName) → OpenSNRDDAO.inc.php
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.
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
Example: 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?