provide patches for external file browsers

Comments

mephir’s picture

jdelaune’s picture

Version: » 6.x-1.0-beta1

Thanks, I'll review this asap and see what I can do. I'll also write another plugin for IBv2 for the CKeditor project. The sooner everyone uses CKeditor the better :P

jdelaune’s picture

Title: patches for external file browsers » Support for ImageBrowser
Status: Active » Fixed

Awesome worked a treat. I'll commit this to the 6.x-1.0-dev branch tonight. And I'll do the plugin for IBv2 soon.

wwalc’s picture

Actually, I there is one problem with ImageBrowser integration.
This patch is pretty basic and adds support for sending image Url, without sending any extra information like linking to node, alignment etc.

I think we can go ahead with this patch for now and try providing support for all other features that I mentioned later (in a separate issue, it may require changes in CKEditor core, I have to dig into this). Sounds ok?

jdelaune’s picture

Sure let me know when you want me to do something.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

alfthecat’s picture

Status: Closed (fixed) » Active

Hi,

I tried to patch the imagebrowser.info file with the file from #1 but I get a failure.

I use the imagebrowser version 1 RC from july 19. I would like to use the imagebrowser module with Ckeditor, so I'm curious about the status for this integration and if there is a new patch available maybe...

Thanks!

.rej contents:

***************
*** 12,34 ****
function SelectFile(url, width, height, alt, link, link_target, styles)
{
if(window.opener) {
//url, width, height, alt
- window.opener.SetUrl( url, width, height, alt );
-
- if (window.opener.GetE('txtLnkUrl')) {
- window.opener.GetE('txtLnkUrl').value = link ;
}

- if (window.opener.GetE('cmbLnkTarget')) {
- window.opener.GetE('cmbLnkTarget').value = link_target ;
- }

- if (window.opener.GetE('txtAttClasses')) {
- if(styles == '') {
- window.opener.GetE('txtAttClasses').value = 'ibimage';
}
- else {
- window.opener.GetE('txtAttClasses').value = 'ibimage ' + styles;
}
}
}
--- 12,52 ----
function SelectFile(url, width, height, alt, link, link_target, styles)
{
if(window.opener) {
+ var href=window.location.href.split('&');
+ var app=false;
+ var cfunc=false;
//url, width, height, alt
+ for(var x in href){
+
+ if(href[x].match(/app=[a-z]/i)){
+ app=href[x].split('=');
+ app=app[1];
+ }
+ if(href[x].match(/^CKEditorFuncNum=\d+$/)){
+ cfunc=href[x].split('=');
+ cfunc=cfunc[1];
+ }
}
+ if(app=='ckeditor'){
+ window.opener.CKEDITOR.tools.callFunction( cfunc, url);
+ } else {
+ window.opener.SetUrl( url, width, height, alt );

+ if (window.opener.GetE('txtLnkUrl')) {
+ window.opener.GetE('txtLnkUrl').value = link ;
+ }

+ if (window.opener.GetE('cmbLnkTarget')) {
+ window.opener.GetE('cmbLnkTarget').value = link_target ;
}
+
+ if (window.opener.GetE('txtAttClasses')) {
+ if(styles == '') {
+ window.opener.GetE('txtAttClasses').value = 'ibimage';
+ }
+ else {
+ window.opener.GetE('txtAttClasses').value = 'ibimage ' + styles;
+ }
}
}
}

dczepierga’s picture

Status: Active » Closed (fixed)

I closed this issue because is not active over 1 year.

If u have any questions pls reopen it.

Greetings