[Koha-devel] Ideas for Koha Plugins

dcook at prosentient.com.au dcook at prosentient.com.au
Thu Nov 5 01:07:08 CET 2020


Hi all,

 

I was looking at Mark's bug report at
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26890, and it got
me thinking about how we use Koha Plugins (amongst other things). 

 

I think it would be interesting to let Koha plugins touch the $template
object before $template->output is called. That would give Koha plugins a
lot more power without having to hardcode in specific methods and such into
Perl scripts. The Perl script could lookup Koha plugins using a hard-coded
key (e.g. opac/opac-detail.pl or opac/opac-detail), and then it would be the
job of the Koha plugin to take things from there. 

 

As a related aside, at some point, I'm planning to replace
"output_html_with_http_headers" and "output_with_http_headers" (as part of
Bug 26845 probably), but I'm not quite there yet. I'm slowly in the process
of building Mojolicious controllers to replace our CGI scripts, and I'm
hoping to refactor some vital components of Koha so that our CGI scripts
keep working, but the new Mojolicious controllers are able to re-use the
same code and stay consistent. 

 

Anyway, it's just an idea. We could implement it in
"output_html_with_http_headers", or we could just implement it in some
important scripts like opac-detail.pl. I don't have any particular use-cases
in mind (besides Mark's). 

 

Another idea would be to put more of the UI logic into Javascript and hook
plugins in more dynamically with the Javascript at a per-page level (rather
than only via IntranetUserJS and OpacUserJS), but I haven't thought too much
about that.

 

David Cook

Software Engineer

Prosentient Systems

72/330 Wattle St

Ultimo, NSW 2007

Australia

 

Office: 02 9212 0899

Online: 02 8005 0595

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20201105/6c056985/attachment-0001.htm>


More information about the Koha-devel mailing list