[Contributing] HTML_Image
| From: | MARTY Fabien | Date: | Tue, 30 Apr 2002 19:25:17 +0000 |
| Subject: | [Contributing] HTML_Image | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-5935@lists.php.net to get a copy of this message | ||
Hello,
I would like to contribute to PEAR with a new package 'HTML_Image'.
>>> WHY ?
You make a website (with templates or not), it's always boring to deal with
image widths, heights, captions or adresses. When you change an image, you
have to modify a lot of things...
>>> HTML_Image ?
The idea is to store in a common place images datas (widths, heights,
captions...). The package uses a container system so it could be in a
database (the DB container is the only one implemented now), in a XML file...)
When you have done this work, manipulating images is quite easy. You make a
HTML_Image_Manager and after, you can load and manipulate image datas as
objects. For example :
$image = $imageManager->load("nameOfTheImage"); // to load
$image->htmlOut(); // to send the html code to the browser
$images = $imageManager->multipleLoad("groupName"); // to load all the images
of the specified group in an array
You can also display a random image with :
$random = $imageManager->random();
$random->htmlOut();
Of course you can get the html code instead of sending directly to the
browser (templates uses)... You can add arguments to mainly methods. So it is
flexible (zoom on an image, add html tags...)
a longer SYNOPSIS is available at :
http://www.esub2.com/SYNOPSIS
>>> SourceCode
The SourceCode is available at :
http://www.esub2.com/HTML_Image.tar.gz
>>> Current state
The code isn't perfect. I have to add little things like error controls or to
use references instead of copy of the $db object. But before, I would like to
know if you are interested by this new package that i would be very happy to
develop into PEAR.
Thanks,
Fab
(fabien.marty@free.fr)