[dev] Re: [cvs] commit: kronolith month.php [patch attached]

Derek P. Moore derekm at hackunix.org
Mon Nov 29 17:50:11 PST 2004


Quoting Chuck Hagenbuch <chuck at horde.org>:

> I've implemented yet a third solution: if the $attr parameter is an
> array, it'll be treated as a set of tagname/value pairs. You can use this
> to override the title text (it still defaults to $alt) or add any other
> parameters you need. How's that? :)

Excellent.  The best of both worlds.  And the implementation is /very/ 
clean and
simple.

There's one issue with the code as is.  The <img> element will have two title
attributes if the programmer uses:

Horde::img('icon.png', 'Something', 'title="Do Something Here"');

I'll attempt to integrate grepping of the $attr string for 'title=', if nobody
else gets around to it first.

> This sounds great and consistent. Would you be willing to rewrite the
> patch for the new API as committed?

Attached are Kronolith.img.diff and IMP.img.diff.  They update 
Kronolith and IMP
in appropriate places to the new Horde::img() API.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Kronolith.img.diff
Type: text/x-patch
Size: 12142 bytes
Desc: not available
Url : http://lists.horde.org/archives/dev/attachments/20041129/82b252ce/Kronolith.img.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: IMP.img.diff
Type: text/x-patch
Size: 7687 bytes
Desc: not available
Url : http://lists.horde.org/archives/dev/attachments/20041129/82b252ce/IMP.img.bin


More information about the dev mailing list