Please remove me from this email list! Thanks!
On 05.10.2012 07:49, Thomas Bruederli wrote:
On Thu, Oct 4, 2012 at 11:20 PM, john.roman@dreamhost.com wrote:
greetings, i am trying to write a plugin to change the src attribute of the template_object_logo hook, but nothing seems to be working.
the hook being called:
$this->add_hook('template_object_logo', array($this,
'template_logo'));
the function:
function template_logo($argst) { $argst['src'] = "/images/roundcube_logo2.png"; $argst['alt'] = "second logo test"; } return $argst; }
The template_object_* hooks are triggered *after* the content for that object was already composed. Thus altering the attributes hasn't any effect here. As you can read in the docs at http://trac.roundcube.net/wiki/Plugin_Hooks#TemplateHooks, only the 'content' field is relevant. In order to make your plugin work, just add $argst['content'] = html::img($argst); right before return $argst.
Regards, Thomas _______________________________________________ Roundcube Users mailing list users@lists.roundcube.net http://lists.roundcube.net/mailman/listinfo/users