Please add a code procedure to prevent the 'Add image' link or icon from appearing under the Log textarea that is found in most (if not all) node types. I doubt that anyone would want to place an image there.

Comments

zoo33’s picture

Yes, that would be better.
In general, what texfields do you think should have a link? Should we put the link only under node body textfields or should we just exclude the log message fields?

The place to do this is in or around the function img_assist_elements() if anyone wants to work on it.

darren oh’s picture

We could probably make the link display only for filtered text areas.

reevesj’s picture

Would it be a bad solution to just code for a few fields? There are other textareas (like the mission and page footer) that have the attach link, but those might (sometimes) need images. I can't think of other places that should not have the attach link.

darren oh’s picture

I would advise against hard-coding specific fields into this module. Exceptions for specific fields should be configurable.

zoo33’s picture

So, first a check to see if the textarea has an input format. That makes perfect sense since those are the only places you'll be able to use the [img_assist] filter format. Then a new setting to allow specific textarea IDs to have links as well. Or how about this option: "Display only if the following PHP code returns true"? That would also work if you wanted to add textareas that are not filtered.

There is currently a similar discussion on the development list about WYSIWYG editors. Look at this message for instance.

moonray’s picture

I was just at the openCMS summit. There I learnt about hook_element.
This might be a much nicer way to alter textareas to add the "add images" button. Whomever is going to write the patch might want to look into that.

zoo33’s picture

I think that's actually how it's done now. No idea how you'd check for the input format option though.

wim leers’s picture

Assigned: Unassigned » wim leers
Status: Active » Closed (duplicate)

Patch posted at the other issue, so I'm marking this issue as duplicate. Please review the patch so we can get it in img_assist ASAP!