Closed (fixed)
Project:
Image Assist
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
10 May 2006 at 07:46 UTC
Updated:
11 May 2007 at 12:19 UTC
Jump to comment: Most recent file
Comments
Comment #1
darren ohI doubt we have much chance of getting other modules to use a form attribute specific to Img_assist. Htmlarea had a setting to allow it to be disabled for specific text areas. A similar feature would solve the problem for Img_assist without requiring other developers to change the way they create forms.
Comment #2
AjK commentedThat's fine. So what is the method to suppress the link in that case? Anything's better than nothing at all. I see the link all over the place in situations where it's wholey inappropiate. There has to be a method of switching it off regardless of how it's implemented?
Comment #3
darren ohI don't know. If someone has time to find out, please let me know.
Comment #4
darren ohComment #5
AjK commentedErm, I think that's a valid support request. It may be a feature but if you don't know and I don't know maybe the module maintainer would know?
Comment #6
darren ohDoes htmlarea still have a maintainer? The project was practically shut down by license issues. For Img_assist this would be a feature. I'll copy the feature from htmlarea when I have time to look at the code, or when someone else does.
Comment #7
wim leersI think this is the cleanest solution:
1) by default, only let img_assist do its magic on textareas with an id "edit-body"
2) give the user the option to add more form id's in the settings
Comment #8
chx commentedInterested contrib authors should write a module which keeps a tally of textareas by form_id and serialized #parents and then tinymce, imgassist and whatever can use this module to disable themselves on demand.
Comment #9
zoo33 commentedWe already have this issue: Prevent 'Add image' link from appearing under Log. There are a couple of other ideas there. I guess this or that other issue should be marked as duplicate.
I'd be happy to review patches that give the user some way of controlling what textareas are used, but I don't have time right now to work on it myself.
Comment #10
wim leersOkay. Patch upcoming. I thought I'd get some sleep first, but since you're around, I'll first get the patch finished :)
The configuration stuff is finished, just cleaning up my code.
Comment #11
wim leersAnd here's the patch! This patch does what I described in #7. It also improves the dependency check for image.module. It doesn't break any existing functionality. There might be some errors in there, because of me hurrying this out. But it's definitely working well.
Further suggestions:
-"img_assist_all" variable should be renamed to "img_assist_paths_type"
-"img_assist_pages" variable should be renamed to "img_assist_paths"
-"_img_assist_page_match()" function should be renamed to "img_assist_path_match()"
I didn't make these changes to keep the amount of code to review smaller.
Comment #12
zoo33 commentedThat looks very promising! I'll give it a try as soon as I can.
This new option will be somewhat developer oriented or at least pretty technical. Would it be possible somehow to let users control this without looking up the form IDs? I guess the default value ("edit-body\nedit-comment") should be sufficient in most cases, the exception being CCK fields. Maybe a short explanation of what form ids are and/or where you can find them would be helpful?
Comment #13
wim leersAdded your request, also implemented my suggestions while I was busy. Now all path/textarea options are:
And the guiding description (which needs to be improved):
Comment #14
jaredwiltshire commentedWorks for me.
Comment #15
wim leersGreat, jaredwiltshire!
Now we only need one of the maintainers to review & approve the patch and to commit it. I hope one of them will step up soon... perhaps we should contact zoo33?
Comment #16
darren ohWhat we maintainers are wondering is why no one has changed the status to "ready to be committed".
Comment #17
wim leersBecause AFAIK, it's not the convention on d.o. to mark the status as RTBC, but as code needs review, since it's not up to us humble patch submitters to decide on that. Or does that only apply to Drupal Core?
Marked as RTBC, per request.
Comment #18
darren ohThe accepted practice is for the patch author to request that the patch be reviewed and for anyone who tests the patch to change the status to "ready to be committed" if it works or "code needs work" if it doesn't. What the core developers frown on is patch authors setting the status to "ready to be committed" before anyone else has tested the patch.
Comment #19
wim leersOk, thanks for the explanation :) Will do so in the future!
Comment #20
zoo33 commentedI won't be able to take care of this for another two weeks or so since I'm I'm out of town on vacation. (In fact, I'm not even writing this comment...) If darren or benshell wants to do it then go ahead!
Comment #21
darren ohFixed in CVS commit 65519.
Comment #22
killes@www.drop.org commented