diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 388a46b624383bcef7809aed9427e6a195815a1c..7cdee7525b79f3badcd9540785a3384a692506ee 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -2,6 +2,7 @@ $Id$ -- 2009-03-11 version 6.x-1.x-dev * #380134 Fixed the incompatibility with JsMin in IE +* #379088 Added support for Web File Manager (WebFM) -- 2009-03-10 version 6.x-1.x-dev * #389186 Fixed the issue with calling IMCE filebrowser when index.html resides in Drupal folder diff --git a/fckeditor.module b/fckeditor.module index ddb104b555b03cf7e7f12d57cb5fb2098c5648e6..248c0d9ded0065307fff1e774f1dcbac69a957b3 100644 --- a/fckeditor.module +++ b/fckeditor.module @@ -108,10 +108,11 @@ function fckeditor_help($path, $arg) { '!buttons1' => "['Image','Flash','Table','Rule','SpecialChar']", '!buttons2' => "['Image','Flash','Table','Rule','SpecialChar', 'DrupalBreak', 'DrupalPageBreak']", )); - $output .= t('

Uploading images and files

There are three ways of uploading files: by using the built-in file browser, by using modules like !imce, !ib or by using the core upload module.

', + $output .= t('

Uploading images and files

There are three ways of uploading files: by using the built-in file browser, by using modules like !imce, !ib, !webfm or by using the core upload module.

', array( '!imce' => l(t('IMCE'), 'http://drupal.org/project/imce'), - '!ib' => l(t('Image Browser'), 'http://drupal.org/project/imagebrowser') + '!ib' => l(t('Image Browser'), 'http://drupal.org/project/imagebrowser'), + '!webfm' => l(t('Web File Manager'), 'http://drupal.org/project/webfm'), ) ); // the rest is untranslated for the moment @@ -995,6 +996,9 @@ function fckeditor_process_textarea($element) { if ($filebrowser == 'ib' && !module_exists('imagebrowser')) { $filebrowser = 'none'; } + if ($filebrowser == 'webfm' && !module_exists('webfm_popup')) { + $filebrowser = 'none'; + } $quickupload = (!empty($conf['quickupload']) && $conf['quickupload'] == 't'); // load variables used by both quick upload and filebrowser @@ -1070,13 +1074,22 @@ function fckeditor_process_textarea($element) { $js .= $js_id .".Config['ImageBrowser']= true;\n"; $js .= $js_id .".Config['LinkBrowser']= true;\n"; $js .= $js_id .".Config['FlashBrowser']= false;\n"; - $js .= $js_id .".Config['ImageBrowserURL']= '". $host ."?q=imagebrowser/view/browser&app=FCKEditor';\n"; - $js .= $js_id .".Config['LinkBrowserURL']= '". $host ."?q=imagebrowser/view/browser&app=FCKEditor';\n"; + $js .= $js_id .".Config['ImageBrowserURL']= '". $host ."index.php?q=imagebrowser/view/browser&app=FCKEditor';\n"; + $js .= $js_id .".Config['LinkBrowserURL']= '". $host ."index.php?q=imagebrowser/view/browser&app=FCKEditor';\n"; $js .= $js_id .".Config['ImageBrowserWindowWidth']= '680';"; $js .= $js_id .".Config['ImageBrowserWindowHeight'] = '439';"; $js .= $js_id .".Config['LinkBrowserWindowWidth']= '680';"; $js .= $js_id .".Config['LinkBrowserWindowHeight'] = '439';"; break; + case 'webfm': + $js .= $js_id .".Config['LinkBrowser']= true;\n"; + $js .= $js_id .".Config['ImageBrowser']= true;\n"; + $js .= $js_id .".Config['FlashBrowser']= true;\n"; + $js .= $js_id .".Config['ImageDlgHideLink']= true;\n"; + $js .= $js_id .".Config['LinkBrowserURL']= '". $host ."index.php?q=webfm_popup&url=txtUrl';\n"; + $js .= $js_id .".Config['ImageBrowserURL']= '". $host ."index.php?q=webfm_popup&url=txtUrl';\n"; + $js .= $js_id .".Config['FlashBrowserURL']= '". $host ."index.php?q=webfm_popup&url=txtUrl';\n"; + break; default: case 'none': $js .= $js_id .".Config['LinkBrowser'] = false;\n"; @@ -2064,13 +2077,14 @@ function fckeditor_profile_form_build($sth, $edit) { '#title' => t('File browser settings'), '#collapsible' => TRUE, '#collapsed' => TRUE, - '#description' => t('Set file browser settings. A file browser will allow you to explore the files contained on the server and embed them as links, images or flash movies. Besides the built-in FCKeditor file browser, you can also use a contributed module like !imce or !ib. The quick upload setting controls whether images, flash movies and files can be uploaded using the Upload tab of the respective dialogs. Please note that these options require manual configuration, check !readme for more information.
', - array( + '#description' => t('Set file browser settings. A file browser will allow you to explore the files contained on the server and embed them as links, images or flash movies.') .' '. t('Besides the built-in FCKeditor file browser, you can also use a contributed module like !imce, !ib or !webfm.', array( '!imce' => l(t('IMCE'), 'http://drupal.org/project/imce'), - '!ib' => l(t('Image Browser'), 'http://drupal.org/project/imagebrowser'), + '!webfm' => l(t('Web File Manager'), 'http://drupal.org/project/webfm'), + '!ib' => l(t('Image Browser'), 'http://drupal.org/project/imagebrowser'))) .' '. t('The quick upload setting controls whether images, flash movies and files can be uploaded using the Upload tab of the respective dialogs.') .' '. t('Please note that these options require manual configuration, check !readme for more information.', + array( '!readme' => l('readme.txt', 'admin/help/fckeditor'), ) - ) + ) .'
' ); $filebrowsers = array( @@ -2086,6 +2100,10 @@ function fckeditor_profile_form_build($sth, $edit) { $filebrowsers['ib'] = t('Image Browser'); } + if (module_exists('webfm_popup')) { + $filebrowsers['webfm'] = t('Web File Manager'); + } + $form['fckeditor_upload_settings']['filebrowser'] = array( '#type' => 'select', '#options' => $filebrowsers,