Besides having images as nodes themselves, I usually miss the ability to *easily* create simple stories, blogs, etc with just a single image. I think the current image extensions - image_filter and image_assist-, are nice and powerful, but they're usually too powerful -and complex- for average users.

This patch is quite straight forward, and adds just a few lines of code to the image module:
- The main implementation is done in a single function: hook_nodeapi.
- Some options for displaying this images are added to image_settings

Comments

boris mann’s picture

Can you please attach a screenshot and describe the workflow.

I am likely going to -1 anything that adds code to image in core, unless it is super fantastic, especially when calling solutions like img_assist complex (a great, useful, and easy module in my opinion).

Bèr Kessels’s picture

see my much simple approach -for core- at http://drupal.org/node/26288

jose reyero’s picture

Ber, I like your approach too. Actually I think that upload module could be extended a little bit.

But, is there any reason why we cant have both? I see them as complementary, more than a replacement.

Bèr Kessels’s picture

Well. In general I am against any options for visual things. Layout must be done in the theme. Not with options. So a definite -1 on the placement options.

I like the idea though, bu why can we not do this the simple way: wtih a contrib that handles [image:] tokens?

jose reyero’s picture

Ok, your objection -for the positioning- makes a lot of sense, so I could have saved that part. I was just thinking of some module that you just enable and then, voila!, you have images in stories. I'll try to rework this a little bit then.

But about [images: ] tokens, that is ok for content editors, but way too complex for too many users. I need simple, simple, simple image handling...

However, my ideal solution would be adding some 'type' field to the files table, and then define some values like 'attachment', 'thumbnail', 'picture', etc.... this way, the image.module wouldn't have to mess with file names and this objects could be used accross Drupal by any module and theme....

But, when it comes to the interface for adding images to stories, blogs, etc, I think this is really the best. It's not a replacement, but fully compatible with that [images: ] that can be handled by more skilled editors.

jose reyero’s picture

StatusFileSize
new2.54 KB

I've just removed all that settings, and replaced them with a themeable function.

venkat-rk’s picture

I was just thinking of some module that you just enable and then, voila!, you have images in stories.

Absolutely. This should how it should be to the end users. If the intent of this patch was to make it easy for users to define placement of images, then the removal of placement settings is a step backward.

-1 from me as a simple user. Why should the placement of images be left *only* to the themers? Can we at least have the placement settings as an option in addition to the themeable function?

Bèr Kessels’s picture

Before you say tghat you need placement of images you should have a look on the internet.

ou will see that *hardly any* good CMS diven site allows placement of images. There are loads of reasons, but it comes down to: added complexity for something ppl dont want.

I developed an ilmage placement thing for drupal, for a client (cost a lot of money) and gues what? They used it to place the image on exact the same place on each page! Really, the EASY solution is a default placement, coded in the theme;
Power users should use HTML and something like a wysiwyg or img assist.

Anonymous’s picture

Version: 4.6.x-1.x-dev » 6.x-1.x-dev
StatusFileSize
new4.92 KB

Here's an update of Jose's patch for 4.7. I think this is still the easiest way for users to display an image with a node, but please tell me if I've missed something! Jose, thanks for sharing this in the first place.

guardian’s picture

Status: Needs review » Fixed

In Drupal 5.x, you can use either http://drupal.org/project/upload_image which takes uploaded images, that are attached to nodes, and creates image nodes from them. It also displays thumbnails in place of the file name in the list of attachements.

You could also use CCK, and particularly the http://drupal.org/project/imagefield field to enable single or multiple image fields in your node type.

guardian’s picture

Status: Fixed » Closed (won't fix)