Cor Bosman wrote:
On Jun 26, 2009, at 2:43 PM, Eduard Krieger wrote:
Hi,
in my opinion adding an Hook inside of the template-files is not a
good idea, since then the template-designer is responsible to add the
hook in it's own template. And i don't think this is really a good idea. For every new template there is the risk that the designer forget to
include the hook inside. And if then some plugins don't work someone with more knowledge must look why.I agree that hooks inside the template files isnt a good idea. The OP
could probably just add his rss link to the template itself. Thats
what templates are for.I looked at the code, and the template class seems like a perfect
place to add a hook thats called after each template object and/or
container. The interesting part is, there already is one!$hook = $this->app->plugins->exec_hook("template_container", $attrib);
This hook is called with the container id as a parameter, and you can
return content to add to the container. Unfortunately, it doesnt work,
because RC uses the hook internally and doesnt play nice :) In
function template_container_hook() it replaces the content instead of
adding to it. I think that currently it isnt really meant to be a
publicly available hook. Maybe the devs can shed some light on this
and other hooks in the template class.But, the spot where that hook is placed, is where we could have a
before/after hook to add stuff to template objects and containers.Cor
Solved for new taskbar icons. UI elements can be added using included javascript files as shown in:
http://trac.roundcube.net/wiki/Doc_Plugins#ClientscriptsandUIelements
List info: http://lists.roundcube.net/dev/