creating new classes in OJS 2.0.1

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 http://forum.pkp.sfu.ca

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.
bunswo
Posts: 6
Joined: Mon Aug 15, 2005 1:57 pm
Contact:

creating new classes in OJS 2.0.1

Postby bunswo » Mon Sep 05, 2005 1:51 pm

What is the process for adding new classes in OJS 2.0.1 ? There seems to be more to it than just adding a reference to the new class name in the DAOregistry.ini.php file. Is it something to do with the new pluggin folder?
Thanks in advance!

asmecher
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm
Contact:

Re: creating new classes in OJS 2.0.1

Postby asmecher » Tue Sep 06, 2005 8:53 am

Currently the only plugins supported are import/export plugins, although this will be greatly expanded in a future release.

Generally, you should use the "import" function to bring a new class into OJS. For example,

Code: Select all

import('mail/MailTemplate');
would load the file

Code: Select all

classes/mail/MailTemplate.inc.php
However, most of the system uses a few common design patterns, such as DAOs and DataObjects; see http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html. Following these patterns, including using the DAORegistry when appropriate, will result in better consistency with the codebase and easier maintenance.


Return to “OJS Development”

Who is online

Users browsing this forum: No registered users and 0 guests