[drupal-devel] New image.module
James Walker
walkah at walkah.net
Thu Feb 17 19:33:56 UTC 2005
Hey all,
As promised, I've just committed brand new versions of "my"
image.module to my sandbox. A working version for CVS HEAD is at :
contributions/sandbox/walkah/image (compatible with the new "image
api"). There is also a 4.5 version available in the "45" subdirectory.
As I've mentioned in #drupal and briefly on this list, this version
comes with a slightly new approach. You may notice that the image.*sql
files have been removed. This is because image.module no longer
requires it's own tables. Instead, it uses the files table (previously
only used by upload.module) to store information about all files
(various resolutions) in this table. This has several benefits: First,
it greatly simplifies the installation of image.module, but more
importantly it keeps better track of each image associated with the
node. Where previous image.modules (mine included) relied on naming
conventions to keep track of various sizes & resolutions, this image
module actually has a record for each size - including it's filesize
(making it easy to write a quota.module - for instance).
The other major addition (which was previously left out intentionally)
is the re-introduction of basic image gallery functionality. This is
minimalistic intentionally - and not meant to stifle or otherwise
conflict with other initiatives (such as moshe's album.module). A
couple things to note: the maintenance of gallery albums is done at
?q=admin/image and should be familiar in style for those of you who
have tried HEAD's latest forum.module. Also, the layout no longer uses
tables - as I'm sure some of you will enjoy. However, I don't fancy
myself much of a designer, so suggestions / recommendations on
"default" look and feel are of course very welcome. For those of you
that don't like the approach at all - theme('image_album', $albums,
$images) :)
Now, due to the change in DB storage approach - I have included an
'update-images.php' ... which needs to be run from the root of your
drupal installation. I have done testing on this - however, I'm not
gonna claim complete perfection here. I'd love to have folks with
image.module installations test this out - PLEASE backup your image
files and tables first !!!!
Moving forward - I'd really like to get this into modules/image as soon
as possible so that we (as a community) can use project.module for bug
& feature tracking (rather than random emails / IRC chats / etc).
Ideally, I'd like this to happen by the time contrib is branched for
DRUPAL-4-6 so for 4.6 there will be no confusion of which image.module
to use, etc. As there is a 4.5 version as well, I'm willing to move
that into the DRUPAL-4-5 branch, but I'd like to get some consensus on
that - as I worry it might 'cause more confusion than is really
necessary.
Again, this is not intended as a final version - lots of people are
using image in a lot of interesting ways, I'd be happy to try and
accommodate all features, either through "API"-style functions &
features or as base functionality in the module - but would like to get
some feedback from the community at large as to what people would like
to see.
Cheers,
--
James Walker :: http://www.walkah.net/
More information about the drupal-devel
mailing list