OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



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
Developer Resources:

Documentation: The OJS Technical Reference and the OJS API Reference are both available from the OJS Documentation page.

Git: You can access our public Git Repository here. Comprehensive Git usage instructions are available on the wiki.

Bugzilla: You can access our Bugzilla report tracker here.

Search: You can use our Google Custom Search to search across our main website, the support forum, and Bugzilla.

Questions and discussion are welcome, but if you have a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a technical support question, try the OJS Technical Support subforum.

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
http://www.msu.edu/user/harris41/ojsplugins/


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


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.


Scott
sharrison
 
Posts: 3
Joined: Wed Aug 23, 2006 12:40 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';
$localeCache->setEntireCache($localeCache->cache);
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.

Regards,
Alec Smecher
Open Journal Systems Team
asmecher
 
Posts: 7698
Joined: Wed Aug 10, 2005 12:56 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
http://www.msu.edu/user/harris41/ojsplugins/


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.
sharrison
 
Posts: 3
Joined: Wed Aug 23, 2006 12:40 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!

Regards,
Alec Smecher
Open Journal Systems Team
asmecher
 
Posts: 7698
Joined: Wed Aug 10, 2005 12:56 pm


Return to OJS Development

Who is online

Users browsing this forum: No registered users and 3 guests