Where i must to place this customHeader plugin (which folder under plugins folder)?

Dear support,

We using OJS version 3.1.2-1 Release (May 30, 2019) and install manually Custom Header Plugin that Compatibility release for OJS/OMP 3.1.2 (customHeader-v1.0.1-0.tar)

After i downloaded, extract the customHeader-v1.0.1-0.tar and change it into folder named customHeader. Where i must to place this customHeader plugin? (which folder under plugins folder)

The problem when i create custom sidebar blocks using Generic Plugins - Custom Block Manager, all fine, but when adding javascript from supercounter, the site show nothing. I look for this problem and find to adding script tag i must install customHeader plugin (https://pkp.sfu.ca/2018/03/01/enriching-ojs-omp-with-javascript-no-coding-required/)

Please help, thank you

This is a generic plugin, and will be placed in “plugins/generic”. When not otherwise specified in the plugin’s documentation you can find this in the version.xml file:

The manual installation of any generic plugin will require a manual run of the Upgrade script to complete the installation.

Thank you for your reply, and thank you customHeader plugin has successfully installed. But when i try setting - website - plugins - installed plugins - Generic Plugins - Custom Block Manager and adding javascript from supercounter, the site show nothing.


view site and show nothing. After edit, script tag was missing.


Both of these screenshots appear to be of the Counter custom block. It is likely that any script tags are being removed from this block by HTMLPurifier. Instead, the script tags should be inserted into the Header via the Custom Header plugin. What do you currently have entered there? I would expect your <script> tag to be found there, and then a <div> or <a> tag placed in the custom block, which would be targeted by the custom script. From a quick look at supercounters website, it doesn’t appear that their default counter is created this way. Unless it can be, you may need to make local code changes to allow script tags through HTMLPurifier. See:

Can you give us an example line modification for enable script tag?


I do not have an example to point to. Completely untested, I would think that you would add a statement of:

$config->set('HTML.SafeScripting', true);

But note that this trivial addition would allow all registered users to add javascript to any rich input. This is a security risk.

To make this change, you will be committing to a local code modification and should have in-house technical expertise to understand and manage the change.

Without technical expertise in-house, a better approach would be to check with your provider whether the javascript can be separated from the content display, or consider another hitcounter provider.