Index: fckeditor.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/fckeditor/fckeditor.module,v retrieving revision 1.20.2.96 diff -u -p -r1.20.2.96 fckeditor.module --- fckeditor.module 19 Feb 2009 12:46:57 -0000 1.20.2.96 +++ fckeditor.module 21 Feb 2009 06:36:35 -0000 @@ -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($ele 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 @@ -1077,6 +1081,14 @@ function fckeditor_process_textarea($ele $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['LinkBrowserURL']= '". $host ."?q=webfm_popup&url=txtUrl';\n"; + $js .= $js_id .".Config['ImageBrowserURL']= '". $host ."?q=webfm_popup&url=txtUrl';\n"; + $js .= $js_id .".Config['FlashBrowserURL']= '". $host ."?q=webfm_popup&url=txtUrl';\n"; + break; default: case 'none': $js .= $js_id .".Config['LinkBrowser'] = false;\n"; @@ -2064,10 +2076,11 @@ function fckeditor_profile_form_build($s '#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.
', + '#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, !ib or !webfm. 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( '!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'), '!readme' => l('readme.txt', 'admin/help/fckeditor'), ) ) @@ -2085,6 +2098,10 @@ function fckeditor_profile_form_build($s if (module_exists('imagebrowser')) { $filebrowsers['ib'] = t('Image Browser'); } + + if (module_exists('webfm_popup')) { + $filebrowsers['webfm'] = t('Web File Manager'); + } $form['fckeditor_upload_settings']['filebrowser'] = array( '#type' => 'select',