A few points:
- I have removed the DRUPAL-6--1-0 tag, because further changes would not be contained otherwise. More on creating the first release below.
- Committed an initial README.txt and CHANGELOG.txt. The README.txt might or might not could use some love.
- Updated the project description and project release data to link to README.txt and CHANGELOG.txt in CVS, and to the CVS tree.
Remaining tasks:
- Please read http://drupal.org/node/363367
- I do not understand why you did not use the code as is from the latest patch in #287025: IMCE_Wysiwyg API bridge module ?
- Before tagging DRUPAL-6--1-0, the release date for 6.x-1.0 needs to be updated in CHANGELOG.txt accordingly.
Comments
Comment #1
sunComment #2
sunAttached patch reverts the code to the code of the original patch. I think you mixed some D5 code in there, because the referenced JavaScript files imce_set_tinymce|fck.js do not exist in D6.
That said, a back-port for D5 would be nice to have.
I hope I can leave the rest to you? Feel free to ask if anything is unclear.
Comment #3
vlooivlerke commentedWhere can I download the imce_wysiwyg-HEAD module?
Comment #4
vlooivlerke commentedHere is my pached version.
It shows the brows button, but does not open the popup IMCE window.
Comment #5
PixelClever commentedI'll get on this in the next day or so. I have been flooded with thing lately.
Comment #6
TheRec commentedGreat work guys. Thanks for having started this project, it will be very useful and I think it will be the best compromise we will have ;)
I checked out HEAD from CVS. I played with it few minutes. Button is there when I click to insert an image, popup opens and I can upload, manage and set the image to use. This works all fine for me.
What's not working is inserting links, which also allows users to use IMCE to browse for a file on the webserver if needed, thus should allow the use of IMCE through this new bridge). The problem is that the input field ID (id property of the HTML element) where the path of the selected file is sent is not the same for image (src) and for links (href).
Modules used for my tests :
I joined a patch, it's my first from TortoiseCVS (so be indulgent :P), I hope it will help... at least it is working for images and links, I could not test "Flash" which is also a different input field ID. When I enable "Flash" plugin in WYSIWYG API settings of TinyMCE, this editor does not work anymore, I never use this plugin and do not know if it's a known issue, maybe it will be worth creating an issue there but I do not have a clean install to test it.
Comment #7
sunThe last point about Flash plugin not working is due to #328252: Handle compatibility of internal plugins via plugin API, i.e. a known issue.
Did you apply my patch from #2 ? #2 should be the base for any further patch. Please apply it first and merge your changes into it.
That said, only one caveat in your patch:
The resulting string of '@' + field_name has to be escaped using encodeURIComponent().
Comment #8
TheRec commentedNo, I did not patch with #2 first.
So here is a second patch, not from CVS then but from HEAD with patch #2 and with use of encodeURIComponent. I did not encode the @ because it is was not encoded back then when it was passed through Drupal.settings.imce.url and it is not a user/browser input. Thanks for your advices it is much appreciated.
Thanks for the info about the Flash plugin, one less issue to start for me, and one less duplicate to mark for you ;)
Comment #9
sunUgh - no, #2 is not yet committed. So what we need is a new patch against CVS HEAD, based on #2 + your changes.
Note however, that you also need to encode the @, because it is used in the query string. Drupal's url() function (in PHP) performs this encoding automatically. This missing encoding was one of the mistakes in previous patches of the other issue and the reason why some people reported that it wouldn't work.
Comment #10
q0rban commentedsubscribe
Comment #11
TheRec commentedOk then, sorry for the misunderstanding on my behalf. Here's the patch which merges my changes with your changes from CVS, and yeah it makes sense now, I guess it was too late for me yesterday ;)
About encoding I agree and I read previously that url() does this, unfortunately it must not be doing exactly the same than encodeURIComponent() because if the @ passes in url() the end of the returned URl is :
imce?app=tinymce|url@srcAnd with encodeURIComponent() :
imce?app=tinymce|url%40srcIt works in both cases in IE6, FireFox 3 and Opera 9.6, but you are right, according to the RFC @ is reserved should be encoded.
So I checked the generated Javascript, it is indeed not encoded when using url() because the parameter $query when passed as a string is not going through drupal_query_string_encode, it must be passed as an array of key => value representing the variable => value of the desired querystring. So I modified this too, and put the @ back in imce_wysiwyg.module (doesn't change much, but I prefer doing these tasks on the server whenever possible.. I know I know, there's anyways a call to encodeURIComponent() in the .js file for the field_name, but if you prefer it the other way just modify the patch, at least now it is encoded in both places :P).
**EDIT** I believe other URL's built for FCKEditor, should have their querystring encoded like this too but I cannot test FCKEditor right now and I don't want to touch code I can't test, it's up for grabs for people using FCKEditor, until I find time to test FCKEditor.
Comment #12
PixelClever commentedI committed the patch by TheRec. Do you guys want a dev release? This is mostly your call Sun.
Comment #13
nokes commentedI've been lurking here for a while...fwiw, I'd love to see a dev release and would be happy to help test it.
Comment #14
sunYes, let's start with a development snapshot. http://drupal.org/node/383902 should be available within the next 12 hours.
Please report back in this issue if it works. If you encounter an error, please open a separate issue.
Comment #15
Ogredude commentedI checked out the HEAD version from the repository, and it worked great in my dev environment, so I put it on the production server, and I'm not having any problems with it at all. Certainly a lot easier than muddling around in either the IMCE module, the wysiwyg module, or my theme.
I did, however, have to install the Administration Theme module, as IMCE was taking its styling from the main template (currently A3 Atlantis), which turned the "Upload/Resize/Send to tinymce" etc links at the top into white on white.
Comment #16
csc4 commentedThanks a lot for the work that's gone into this.
Installed successfully and working beautifully for me.
Drupal 6.9
IMCE 6.x-1.2
IMCE Wysiwyg API bridge 6.x-1.x-dev (2009-Feb-26)
Wysiwyg API 6.x-2.x-dev (2009-Feb-25)
Version 3.2.1.1 (2008-11-27)
Comment #17
nokes commentedThanks so much for pulling this together, guys...
Working fine for me as well on several sites:
Drupal 6.9 and 6.10
IMCE 6.x-1.1 and 1.2
Wysiwyg API 6.x-1.0
TinyMCE 3.2.1.1
Comment #18
sunComment #19
sun@Aaron: You missed to add an entry in CHANGELOG.txt and your commit message did not follow Drupal's best practice. Read more on that here: http://drupal.org/node/363367 and http://drupal.org/node/52287.
Committed the same urlencode fix for FCKeditor. Will create a 1.0 release now.