[dev] Hook for render comments

Duck duck at obala.net
Tue Nov 23 08:55:35 PST 2004


On Tuesday 23 of November 2004 15:22, Chuck Hagenbuch wrote:

> First, you attached the hooks.php diff twice, and no diff for view.php.

It was only to set the "threads" variable by a hook call. 

$threads = Horde::callHook('_agora_hook_render_comments', 
array($image_id,'','ansel',str_replace('%25', '%', 
Util::addParameter(Horde::selfUrl(true), 'parent', '%p'))));

> Second, I'd rather see this done by making the API function return an array
> or set of arrays that can be passed to a Horde_Template for formatting (or
> something else if you like), instead of with a hook. Or by passing in a
> Horde_Template file to the API function, which will be filled and then
> returned. How's that sound?

I think that Horde_Template is not flexible as I wish/need. As I know, I 
cannot pass a portion of php code in the template file. For example to re-set 
a sort order of comments or splitting the results per pages or decide if I 
wish to user Horde_Tree or not.

Duck


More information about the dev mailing list