OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Help Building Plugin

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.

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

viewtopic.php?f=2&t=6078&p=23365&hilit=jojovem#p23365

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
jojovem
 
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="http://www.w3.org/1999/xhtml">
<head>
<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 + " ";
}
</script>
</head>
<body>
<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>
  </select>
<input type="button" value="Add" onClick="addtext();">
</form>
</body>
</html>


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

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: http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=5396. 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.

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

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.


Cheers,
Gustavo Andrade
Attachments
print_2.jpg
print_2.jpg (59.51 KiB) Viewed 884 times
print_1.jpg
print_1.jpg (58.83 KiB) Viewed 884 times
jojovem
 
Posts: 18
Joined: Wed Mar 17, 2010 8:19 pm


Return to OJS Development

Who is online

Users browsing this forum: No registered users and 1 guest