My first OJS plugin, "ZipEditingFiles"; is it any

OJS development discussion, enhancement requests, third-party patches and plug-ins.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
The Public Knowledge Project Support Forum is moving to

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.
Posts: 3
Joined: Wed Aug 23, 2006 12:40 pm

My first OJS plugin, "ZipEditingFiles"; is it any

Postby sharrison » Wed Aug 23, 2006 1:03 pm

I wrote a new plugin called "ZipEditingFiles" that
works on OJS v2.1.1.
It is available at

Question 1)
Is there a archive where OJS plugins might be stored for perusal by the

Question 2)
I found that while hooking in extra functionality, it was advantageous
to update some of the text on the templated interface pages (to
be more coherent with what was happening with the adjusted transaction).
The two simple ways of doing this, that I found, were to either
manually edit a .tpl file, or to adjust the OJS locale.xml
file. Is it possible to dynamically substitute the values in the
locale.xml with the plugin's locale.xml values (override
submission.supplementaryFiles or other message keys)?
How to do this? Would this go against the OJS system design?

Question 3)
I am a newbie at OJS plugins (and not much of a PHP guy),
so I would appreciate any pointers as to areas for
coding improvement. Thanks in advance.

FYI, a motivation for this ZipEditingFiles plugin was to allow all users
of the editing phase to alter supplemental files, and to
have changed versions of the supplemental files be stored.
A secondary advantage of this plugin is that the zip feature minimizes
disk usage on the server. In general, I might suggest that the
OJS paradigm of a main submission file and extraneous supplemental files
may not optimally cover all usage cases. That's probably a second
thread though to this e-mail.


Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm

Postby asmecher » Wed Aug 23, 2006 2:07 pm

Hi Scott,

Thanks for contributing! I'll review this in more detail and provide more feedback soon, but regarding your question about locale files, it's obviously best if a plugin doesn't require modification of any part of OJS; it should just drop in and start working. You should be able to override locale keys by doing something like the following:

Code: Select all

$localeCache =& Locale::_getCache(Locale::getLocale());
$localeCache->cache['locale_key_name'] = 'New value for locale key';
This isn't tested, but barring typos, it should work; let me know if you run into any difficulties. Based on feedback from plugin coders, we'll work on simplifying common tasks and improving the plugin API in future releases.

Alec Smecher
Open Journal Systems Team

Posts: 3
Joined: Wed Aug 23, 2006 12:40 pm

Postby sharrison » Thu Aug 24, 2006 2:20 am

Yes, adjusting the locale cache as you describe works,
and I updated my ZipEditingFiles OJS plugin at

I still found it necessary to alter the editorDecision.tpl
file to make the form.send submission button less
generic. As a possible patch to a future OJS release
(although I worry about bloating the
message key list), it may make sense to allow
for customization of specific submission buttons
on different interfaces given their importance.
Yet, the template system does allow for an
intuitive manual fix, so it is not a critical problem
for a specialized usage of OJS. Thanks for your
time. I look forward to any additional feedback... I
want to start off on the right foot in terms of
putting together OJS plugins.

Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm

Postby asmecher » Tue Aug 29, 2006 11:12 am

Hi sharrison,

I've just reviewed the plugin, and the code looks great; you've followed the OJS coding standards well and the plugin looks clean.

This is probably too specific a function to include in the OJS distribution, but we're going to be adding a plugin exchange to our web site in order to allow users to exchange plugins like yours.

My only suggestion is that you use Doxygen-style comments, as are used in many parts of OJS to document functions and function parameters and return values. We'll be making the Doxygen-generated OJS API publicly available soon.

Thanks for contributing!

Alec Smecher
Open Journal Systems Team

Return to “OJS Development”

Who is online

Users browsing this forum: No registered users and 0 guests