You are viewing the PKP Support Forum | PKP Home Wiki

Help needed to edit 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 needed to edit plugin

Postby pale177 » Sat Aug 28, 2010 12:55 pm

I am a basic PHP programmer, trying to edit the METS XML Export plugin. My main concern is, how do I add a page to the existing pages in a plugin? As in, is it any different from normal php code, wherein you just had to create a index.php and you could see the results in a browser.

I am not able to find the directory where I can write and test my code in a browser. I have very little time to finish this project, and I have spent 2 days trying to read through the docs, but need external help to atleast start something.

In short, I just want to create a php page which shows up in the browser. Can anyone give me a short summary of how the entire system works? I will browse through the forum until someone replies.

Thanks in advance for your help!

Harshit Paleja
Posts: 2
Joined: Sat Aug 28, 2010 11:41 am

Re: Help needed to edit plugin

Postby jmacgreg » Mon Aug 30, 2010 2:45 pm

Hi Harshit Paleja,

Can you provide more detail on what exactly you want to do with the plugin? OJS hasn't been developed like a simple PHP web application -- it conforms to a "Model View Controller" (MVC) design pattern, and while this gives us significant advantages in terms of code use and stability etc., it can be more challenging to initially work with the code. More information on OJS design principles, and how to work with the code base, can be found in the OJS Technical Reference, found on this page.

Posts: 4162
Joined: Tue Feb 14, 2006 10:50 am

Re: Help needed to edit plugin

Postby pale177 » Mon Aug 30, 2010 11:28 pm

Thanks for the reply.

These are the steps I need to follow :

1) Prompt the user for an FDA Account Code and FDA Project Code.

2) Create a METS XML file based on the one produced by the “METS XML Export” plug-in and use the Account and Project codes supplied by the user to create an amdSec in the METS XML file.

I need to know where to create the prompt page, passing values will not be an issue with session variables.

3) The rest of the instructions were basic XML manipulation, I finished that part. No issues with that.
Posts: 2
Joined: Sat Aug 28, 2010 11:41 am

Re: Help needed to edit plugin

Postby mcrider » Thu Sep 09, 2010 10:54 am

Hi Harshit,

Its best to look at the other import/export plugins to see how these work. The user import export plugin (in plugins/importexport/users/) in particular shows a form that determines what XML is exported. The form template is in the index.tpl file--This is what you'd modify to determine what you'd see on the page. The logic of the plugin (e.g. where the form is submitted to) is handled in the UserImportExportPlugin.inc.php class file. You should be able to achieve what you want by simplifying the user plugin and modifying it to fit your needs.

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

Return to OJS Development

Who is online

Users browsing this forum: No registered users and 1 guest