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

Chuck Hagenbuch chuck at horde.org
Sat Nov 27 21:56:19 PST 2004


Quoting "Derek P. Moore" <derekm at hackunix.org>:

> I've attached a patch (img.api.diff) that extends Horde::img()'s API in a
> backwards compatible fashion so you can optionally specify alternative
> text for the title attribute as well.  This was the best way I could 
> think of to extend img()'s API, I hope it's acceptable.

There's an unrelated change in there (is_null) - any reason for that?

I think I would rather introduce another parameter; yes, it's awkward, 
but so is
passing in an array or a string, and remember what order to put the darn array
in.

Also, since we're in the middle of an RC, I hesitate to just do the 
change even
if it's completely backwards compatible and all that. On the other hand having
different alt text from title text makes sense to me, so having some way to do
this would be nice.

How about this: specify title="" in the $attr string. Have Horde::img() 
check to
see if the string title=" appears in $attr. If it doesn't, insert 
title="$alt",
otherwise, don't. That way we don't even need a new parameter and you can
achieve the same thing.

Jan, others, thoughts?

-chuck

-- 
"But she goes not abroad in search of monsters to destroy." - John 
Quincy Adams


More information about the dev mailing list