[OJS 3.1] How to package theme plugin

Hello all, @asmecher, @NateWr,

I was able to copy and customize the default plugin and added a few things we require.
How do I package this to install?

I tar.gz the folder (named ibict2020) to ibict2020.tar.gz and ibictDefaultTheme.tar.gz, zipped it to ibict2020.zip but OJS doesn’t install (although it’s working on my notebook development environment).

When using tar.gz above, error message is from key = “manager.plugins.invalidPluginArchive”.

The uploaded plugin archive does not contain a folder that corresponds to the plugin name.

When using .zip error message is from key =“common.invalidFileType”

The uploaded plugin does not fit the category of the upgraded plugin.

What am I doing wrong?

Hi @ramon,

See the Plugin Guide’s instructions on how to package a plugin:
https://docs.pkp.sfu.ca/dev/plugin-guide/en/release#build-and-package-your-plugin

Regards,
Alec Smecher
Public Knowledge Project Team

Hello @asmecher,

How do I add the MD5 checksum?? Or that’s added by PKP later?
I don’t use Github at all…

Should I update the <compatitbility> tag with application=“ojs3”?

Hi @ramon,

Do you intend to add the plugin to the Plugin Gallery? If not, don’t worry about that part of the documentation.

Regards,
Alec Smecher
Public Knowledge Project Team

Hello @asmecher,

It could be added. I don’t mind being responsible for keeping that updated.
However, the .tar.gz file is not being recognized.

We had to comment mime database path as it was preventing us from uploading PNG files.
Could that be the problem?

Hi @ramon,

What I was referring to was this part of the documentation:

Your release package should be a .tar.gz file that contains a single directory with all of the files necessary to run the plugin. The directory name should match the product name in the release XML.

A .zip file won’t work (the plugin installer only accepts .tar.gz), and your archive needs to be structured as described. I would suggest looking at one of the other plugin packages for an example.

Regards,
Alec Smecher
Public Knowledge Project Team

Hello @asmecher,

The theme is basically a copy of the Default Theme…

Here’s the code:
http://revista.ibict.br/ibict2020ThemePlugin.tar.gz

Hi @ramon,

At a glance, you need to call the .tar.gz package ibict2020.tar.gz, not ibict2020ThemePlugin.tar.gz. I see you’ve mentioned trying that above, but I’m not sure if other elements of the packaging have changed since then.

Regards,
Alec Smecher
Public Knowledge Project Team

Hello @asmecher,

It took me a while to figure out, again, that the function file had the wrong name.
After triple checking file and function names, now it’s working as it should.
Soon I’ll implement options for start and end colors for header gradient.