Help Building Plugin

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: 18
Joined: Wed Mar 17, 2010 8:19 pm

Help Building Plugin

Postby jojovem » Tue May 18, 2010 3:22 pm

Hi, i will paste the email i sent to James Macgregor so all you can understand.

Hi James, im the student that wrote this post


By talking to my teachers, i realized that i will have to code tha plugin that makes the area sorting.

Heres my idea, build a plugin that will make difference in the "review interests" field and in the submission, when the author defines the areas of his article.

So, when the author is asked for the areas, instead of writing them he would be able to add them with predefined areas, and will have no chance to write something different, so we have a little bit of coherence when serching for areas. It will be needed to record this areas in the database with managing support in the journal manager session, so the managers can add new areas. The reviewer will have the option to add areas to change his areas of interests field. Why this? I think, by doing this, we can set a pattern of areas that would be a lot useful to search for potential reviewers, and the possibility to match the articles areas with the reviewers areas. Like: "heres is the list of the reviewers that are potentially good to this article."

But, i have no idea how to start, i have a good knowledge of coding, i just need to understand the steps of OJS plugin customizatition. Can you give me some light? Thanks a lot. I am studing the OJS Technical Reference and making some tests.

One last question, the editorial proccess of my teachers do not envolve all the stages defined in OJS(proof reading, layout, etc...) they only want to do this:

Author submits article
Editor choose section editor
Section Editor choose Reviewers
Section editor accept or decline due to the reviewers form response.
The file is sent directly to the issue
If the file does not match the journal rules send back to the author so he can make the final changes, then he send the correct article and the article can be set in the journal, this is kinda what happens in copyediting, but there is no layout editing neither proofreading. Its possible to skip this steps?

Thanks a lot,
Gustavo Andrade Ferreira

Posts: 18
Joined: Wed Mar 17, 2010 8:19 pm

Re: Help Building Plugin

Postby jojovem » Tue May 18, 2010 3:26 pm

Here is a simple example that i want to do

Code: Select all

<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<script language="javascript" type="text/javascript">
function addtext() {
   var newtext = document.form1.placement.value;
   document.form1.outputtext.value += newtext + " ";
<form name="form1">
  <input type="text" name="outputtext" size="50" disabled="true"/>
  <select name="placement">
    <option value="Otimizacao">Otimization</option>
    <option value="Enghenharia">Enginering</option>
<input type="button" value="Add" onClick="addtext();">

In the above code, the otimization and engineering should be pulled from the database, with the option to add or remove areas in the textfield.

Posts: 952
Joined: Mon May 05, 2008 10:29 am
Location: Vancouver, BC

Re: Help Building Plugin

Postby mcrider » Wed May 26, 2010 12:52 pm

Hi Gustavo,

Your idea is a little related to something that I'll be implementing fairly soon: This will give us more flexibility over storing reviewer interests which will enhance their searchability, and make it easier to allow for what you discuss (having a predefined set of possible reviewer interests). Until then, developing this (especially as a plugin) would take a good deal of work--I'd suggest waiting to see what comes out of this bug entry, and then customizing your system with anything else you'll need from it.

Until then, a good way to get familiar with writing plugins is by looking at the plugins that already exist--The 'counter' plugin in generic/counter/ in particular is a good example at understanding how Hooks are used and how plugin's can use their own database schemas.


Posts: 18
Joined: Wed Mar 17, 2010 8:19 pm

Re: Help Building Plugin

Postby jojovem » Wed May 26, 2010 4:02 pm

Nice to hear that i could help with new ideas to be done :D

As i said in the other posts, i had a strictly deadline with my teachers, so i made a little tricky stuff. I created a new table areas(area_id,area_name) where i stored the area names, i created a php file that includes new areas and delete old areas by using javascript and inserting a new link in the journal manager link.
When a author submits an article or when the reviewing interests are being edited, i put the field status do readonly, only letting the users adding the areas using my pop up javascript with an ADD AREAS button.

I attached 2 printscreens of my work.

Gustavo Andrade
print_2.jpg (59.51 KiB) Viewed 1058 times
print_1.jpg (58.83 KiB) Viewed 1058 times

Return to “OJS Development”

Who is online

Users browsing this forum: Google [Bot] and 1 guest