Where to find list of hooks, especially in dashboard / submission / issues?

I am running OJS3.1.1-1, and I am trying to find a place where to hook a plugin in the issues management page.

I have found the php, and the tpl files, and I would like to create a button on the page to load in a div a table of contents, which will then be sent to registered users.

Most of the background work is ready, now it is the interface that I need to work upon.

thanks

Stephen

Hi @ssciberras,

To list all hooks, I’d suggest adding (temporarily) the following in your lib/pkp/classes/plugins/HookRegistry.inc.php in the call function:

error_log($hookName);

This will cause OJS to list all hooks in the error log as they’re called.

Regards,
Alec Smecher
Public Knowledge Project Team

@asmecher The problem is that doing so, each click prints one million callbacks in the log, making a meaningful hook search imposssible.

By the way, almost no hook in Hook List shows up in the log, specially in the Templates. Has there been an important change with the hook system, do I have to install a plugin for the template hooks?

Hi @asdf,

That reference is extremely old and the hook list has not been maintained. If you’re looking for template-related hooks, check for calls to HookRegistry::call in lib/pkp/classes/template/PKPTemplateManager.inc.php (and lib/pkp/classes/template/PKPTemplateResource.inc.php in recent releases).

Regards,
Alec Smecher
Public Knowledge Project Team