[development] nodeapi image concept (request for feedback)

Sean B. Fuller sean at seanbfuller.com
Mon Apr 3 16:28:23 UTC 2006


I'm definitely cool with the image upload functionality going into 
image.module.

I've already had five requests for multiple images since I posted the 
code on Friday and I think it would definitely be a good feature, but 
this might be a job for a different module. At first glance, it seems 
like this would require a different relational scheme. The nodeapi_image 
code is based on the same logic as image.module, where each node gets 
one image. Trying to pack multiple images into the images array could 
prove messy.

As an alternative, allowing several different images might be done by 
making each image its own node and creating a relation between the 
parent node (the page) and the children (its images). It would require 
some sort of interface, perhaps on a "mini-gallery" tab, where you could 
set the weight of each image, delete images, add images, replace images, 
change the captions, etc. Submitting this page would then perform a 
batch save/update/delete of the image nodes and update the relational 
table for parents and children. The end result might be a nice row of 
thumbnails that the user could click on and browse through as a sort of 
mini-gallery. Imagine clicking on a thumbnail and getting a 
preview-sized image, a caption, a link back to the page view, a previous 
image link, and a next image link. The above description sounds similar 
to functionality that already exists in other modules, so it seems possible.

But like I said, after considering all the management interface that 
would be needed to really make multiple images work, it seems like 
trying to pack this all in to image.module might be a bit much. I'd 
rather see the nodeapi_image functionality that I posted added to 
image.module, and then start a new thread about how to effectively make 
an embedded multi-image mini-gallery in a node. That's my two cents 
anyway. Thoughts?

-sean

> I think it's exactly what a lot of people have been asking for in 
> image.module for a long time -- definitely more useful for the 
> majority of people than the gallery function. Like uploading, it can 
> be turned off on a nodetype by nodetype basis, so nothing is *forced* 
> on users, neh?
>  
> I'm curious whether it could be used by a module I'm working on -- a 
> 'graphic novel' nodetype that would have 2 explicitly named images 
> associated with it (one for the left page and one for the right page 
> of a two-page spread).
>


More information about the development mailing list