I am trying to write a small plugin that would enable the reviewers to undo their decision to reject a previous article review offer. To do this I would like to add a new "undo decision" links on the archived submissions that a reviewer gets to see. As I found no particular hooks that I can use for this, I wanted to use the loadhandler hook to intercept all calls to journal/reviewer/index
- Code: Select all
HookRegistry::register ('LoadHandler', array(&$this, 'handleRequest'));
- Code: Select all
function handleRequest($hookName, $args) {
$page =& $args[0];
$op =& $args[1];
$sourceFile =& $args[2];
if ($page === 'reviewer' && $op === 'index') {
define('HANDLER_CLASS', 'ExampleHandler');
$sourceFile = $this->getPluginPath() . '/' . 'ExampleHandler.inc.php';
}
}
The ExampleHandler class for now is just an empty subclass of ReviewerHandler:
- Code: Select all
import('classes.reviewer.ReviewerHandler');
class ExampleHandler extends ReviewerHandler {
function ExampleHandler() {
parent::ReviewerHandler();
}
}
The callback function is being invoked but all I get is this error:
Fatal error: require_once() [function.require]: Failed opening required 'classes/reviewer/ReviewerHandler.inc.php' (include_path='.:/data/www/press/ojs/htdocs/classes:/data/www/press/ojs/htdocs/pages:/data/www/press/ojs/htdocs/lib/pkp:/data/www/press/ojs/htdocs/lib/pkp/classes:/data/www/press/ojs/htdocs/lib/pkp/pages:/data/www/press/ojs/htdocs/lib/pkp/lib/adodb:/data/www/press/ojs/htdocs/lib/pkp/lib/phputf8:/data/www/press/ojs/htdocs/lib/pkp/lib/pqp/classes:/data/www/press/ojs/htdocs/lib/pkp/lib/smarty:.:/usr/share/php:/usr/share/pear') in /data/www/press/ojs/htdocs/lib/pkp/includes/functions.inc.php on line 30
Where am I going wrong? Can someone please help me with this.
Thanks,
Phani
