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.
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
Comment #1
zoo33 commentedYes, 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.Comment #2
darren ohWe could probably make the link display only for filtered text areas.
Comment #3
reevesj commentedWould 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.
Comment #4
darren ohI would advise against hard-coding specific fields into this module. Exceptions for specific fields should be configurable.
Comment #5
zoo33 commentedSo, 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.
Comment #6
moonray commentedI 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.
Comment #7
zoo33 commentedI think that's actually how it's done now. No idea how you'd check for the input format option though.
Comment #8
wim leersPatch 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!