Making a plugun "un-disableable" for anyone but a site administrator

Hi @jesperlauridsen,

That looks fine – the <application>RDLCookiePolicy</application> entry matches the plugins/generic/RDLCookiePolicy pathname. (This forum uses Markdown for formatting, by the way.)

For installing settings on journal creation, you’ll want to implement getContextSpecificPluginSettingsFile in your plugin class, and add a settings.xml file containing the default settings. See e.g. plugins/generic/tinymce/TinyMCEPlugin.inc.php for an example.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

This was the final piece i was missing, and it seems to be working as intended now. Thanks alot for all the help and feedback, really appreciate it!

Kind regards,
Jesper.

1 Like

Hi, @asmecher,

One final question: If I have an OJS server with 50 journals, and i upload a plugin to the main site - is it possible to have a configuration in the module to activate it on all the journals on the server after the upload on the main site - or do I have to manually activate it on the journals? The getContextSpecificPluginSettingsFile seems to cover that, if any new journals are added, the plugin is activated by default. But the ones already on the server upon upload is not activated then the plugin is uploaded to the main OJS instance.

Kinds regards,
Jesper.

Hi @jesperlauridsen,

If you want to have the plugin enabled for all journals, you could simply override the getEnabled function to always return true.

Regards,
Alec Smecher
Public Knowledge Project Team