[dev] IMP dynamic redirection
Michael M Slusarz
slusarz at bigworm.colorado.edu
Mon Apr 5 15:56:29 PDT 2004
Quoting Stuart Bingë <s.binge at codefusion.co.za>:
> Hi guys,
>
> Attached is a patch which implements the dynamic redirection scheme
> in IMP. As
> per the results of the discussion we had about this a couple of days ago my
> solution is done by using hooks. I've added two hooks - one is called when
> the user opens a mailbox and allows the user to be redirected based on the
> name of the folder opened, and the second allows a custom icon to be shown on
> a per-folder basis when viewing the folder list.
>
> I've also included the necessary sections to config.xml to configure this
> functionality, as well as example hook functions to hook.php.dist to show how
> this can be used.
>
> Feedback is appreciated - this is my first experience in using Horde hooks so
> it may be horribly wrong :-) Specifically, I'm not sure whether my
> redirection code in mailbox.php is in the correct place; this is just where I
> used to have my old hard-coded hack, and it seems to work just fine.
Committed with 2 small changes:
1) _imp_hook_mbox_icon() was changed to return an array of mailbox/icon pairs
instead of a single image URL to reduce to one function call (instead of
potentially a function call each time a folder was displayed)
2) To reflect this change in logic, change the name slightly from
_imp_hook_mbox_icon() to _imp_hook_mbox_icons().
Hopefully this doesn't break things too much.
thanks for the commit - looks pretty nifty.
michael
______________________________________________
Michael Slusarz [slusarz at bigworm.colorado.edu]
The University of Colorado at Boulder
More information about the dev
mailing list