OJS development discussion, enhancement requests, third-party patches and plug-ins.
Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher
The OJS Technical Reference
and the OJS API Reference
are both available from the OJS Documentation
You can access our public Git Repository here
. Comprehensive Git usage instructions are available on the wiki
You can access our Bugzilla report tracker here
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
I'm working on a basic plugin for OJS 2.2. I'm at the registering a hook part of the code, and would like to add a link to the Author's Active Submissions Page, under, "Start a New Submission". I have two questions:
1. I couldn't find anything in the Hook List in the OJS Tech. Document that seamed related to adding a hook to the Author's Active Submissions Page - is their a related hook like: Templates::Author::ActiveSubmission?
2. How flexible is OJS in adding hooks?
Then again my understanding of hooks in OJS could be off.
- Posts: 26
- Joined: Wed Nov 28, 2007 1:08 pm
- Location: Toronto
Modifying existing templates is one of the cases where simply modifying the template is easier than using a plugin -- but it is possible to do with a plugin, and since it doesn't involve modifying existing code, upgrades etc. can be easier.
To do this, you'll need to check Request::getRequestedPage() and Request::getRequestedOp() to make sure you're dealing with a page that you want to modify. If so, use Smarty's postfilter mechanism to register an output filter that watches for the "Start a New Submission" link and, if it's found, appends another link.
If you'd like an example that uses postfilters, have a look at the rounded corners plugin (plugins/generic/roundedCorners). This plugin is a little more complicated than what you'll be doing.
Another option you have is to drop some hooks of your own into OJS templates and write a template that uses them. This does involve modifying the template code, but this is a good way of keeping a logical separation between OJS and your own modifications.
Public Knowledge Project Team
- Posts: 7710
- Joined: Wed Aug 10, 2005 12:56 pm
Return to OJS Development
Who is online
Users browsing this forum: Google [Bot] and 1 guest