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
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: 2
Joined: Sat Aug 28, 2010 11:41 am

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: 4191
Joined: Tue Feb 14, 2006 10:50 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: 2
Joined: Sat Aug 28, 2010 11:41 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: 952
Joined: Mon May 05, 2008 10:29 am
Location: Vancouver, BC

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 class file. You should be able to achieve what you want by simplifying the user plugin and modifying it to fit your needs.


Return to “OJS Development”

Who is online

Users browsing this forum: No registered users and 3 guests