RE: [SMARTY-DEV] html_image width and height
| From: | Monte Ohrt | Date: | Thu, 06 Mar 2003 21:58:23 +0000 |
| Subject: | RE: [SMARTY-DEV] html_image width and height | ||
| References: | 1 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-902@lists.php.net to get a copy of this message | ||
On Thu, 2003-03-06 at 15:46, Gerard wrote:
> How about an ALT param? :)
Any parameter you pass that is unrecognized should get passed right
through. Try it:
{image file="foo.jpg" alt="yes, it is foo"}
>
> Also, any idea if there's much performance impact calling getimagesize?
> Particularly if using html_image numerous times on pages.
This is explained a bit in the manual, but could be expanded on if you
have some ideas.
Monte
>
> Gerard
>
>
> > -----Original Message-----
> > From: Monte Ohrt [mailto:monte@ispi.net]
> > Sent: Thursday, March 06, 2003 2:40 PM
> > To: Gerard
> > Cc: Smarty Dev
> > Subject: Re: [SMARTY-DEV] html_image width and height
> >
> >
> > fixed in CVS, thanks.
> >
> > Monte
> >
> > On Thu, 2003-03-06 at 15:32, Gerard wrote:
> > > Looks like the indexes are off by one in html_image:
> > >
> > > if(!isset($params['width'])) {
> > > $width = $_image_data[1];
> > > }
> > > if(!isset($params['height'])) {
> > > $height = $_image_data[2];
> > > }
> > >
> > > The docs state 0 is width, 1 is height, 2 is image type. I get
> > images with a
> > > height of 1 for GIF, 2 for JPEG, ... ;P
> > >
> > > Gerard
> > --
> > Monte Ohrt <monte@ispi.net>
> >
> >
--
Monte Ohrt <monte@ispi.net>