diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 8c706979bf1a994f7eaf0ce4e59e11c79226b970..81c857ffd54dc1950f09f2d21e6b623148b2ab9b 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -2,6 +2,7 @@ $Id$ -- 2009-03-11 version 6.x-2.x-dev * #380134 Fixed the incompatibility with JsMin in IE +* #379088 Added support for Web File Manager (WebFM) -- 2009-03-10 version 6.x-2.x-dev * #389186 Fixed the issue with calling IMCE filebrowser when index.html resides in Drupal folder diff --git a/fckeditor.admin.inc b/fckeditor.admin.inc index e39c3253c46923313ab363ee35cec975d28a7a03..4e08e866ef59c4903c916fb74dd61f1731e29577 100644 --- a/fckeditor.admin.inc +++ b/fckeditor.admin.inc @@ -258,7 +258,7 @@ function fckeditor_admin_profile_form($form_state, $profile = NULL) { '#description' => t('Only roles with "access fckeditor" permission will be shown here. If no role is available, make sure that you have assigned the "access fckeditor" permission.', array('!permission' => url('admin/user/permissions'))), '#required' => TRUE ); - + $form['basic']['allow_user_conf'] = array( '#type' => 'radios', '#title' => t('Allow users to customize FCKeditor appearance'), @@ -277,7 +277,7 @@ function fckeditor_admin_profile_form($form_state, $profile = NULL) { '#collapsible' => TRUE, '#collapsed' => TRUE ); - + $all = filter_list_all(); $form['security']['filters'] = array( @@ -286,7 +286,7 @@ function fckeditor_admin_profile_form($form_state, $profile = NULL) { '#description' => t('Please choose carefully all filters that protect your content (probably not all filters listed below are security filters).'), '#tree' => TRUE, ); - + //don't bother administrator with filters that definitely are not security filters $modules_with_filters_to_skip = array('amazon_filter', 'asy', 'bbcode', 'biblio', 'blockquote', 'bookpost', 'chessboard', 'citation_filter', 'codefilter', 'collapse_text', 'contextlinks', 'coolfilter', 'dialectic', 'dript', 'dme', 'drutex', 'embedfilter', 'ext_link_page', 'extlink', 'elf', 'flickr', 'flickrstickr', 'footnotes', 'formdefaults', 'freelinking', 'gallery', 'geogebra', 'geshifilter', 'gotwo', 'googtube', 'gotcha', 'gtspam', 'hidden_content', 'img_assist', 'image_filter', 'inlinetags', 'insert_view', 'insertframe', 'insertnode', 'interwiki', 'jlightbox', 'jsmath', 'language_sections', 'link_node', 'lootz', 'markdown', 'marksmarty', 'mobile_codes', 'mykml', 'nofollowlist', 'oagwt', 'paging', 'pathfilter', 'pearwiki_filter', 'php', 'pirate', 'reptag', 'scrippet', 'scripturefilter', 'signwriter', 'slideshowpro', 'smartlinebreakconverter', 'smartypants', 'smileys', 'spamspan', 'spam_tokens', 'spoiler', 'table_altrow', 'tablemanager', 'tableofcontents', 'textile', 'tooltips', 'twikifilter', 'typogrify', 'unwrap', 'urlclass', 'urlicon', 'url_replace_filter', 'username_highlighter', 'video_filter', 'quote'); @@ -320,7 +320,7 @@ function fckeditor_admin_profile_form($form_state, $profile = NULL) { ), '#description' => t('There are two ways of starting FCKeditor: automatically and manually (via toggle or in a popup). If you decide to apply security filters only when FCKeditor starts automatically, you\'ll not be protected when toggling manually from plain textarea to FCKeditor or when using FCKeditor in a popup mode. So choose this option only, if you can detect various attacks (mainly XSS) by yourself just by looking at the HTML code.'), ); - + $form['fckeditor_exclude_settings'] = array( '#type' => 'fieldset', '#title' => t('Visibility settings'), @@ -610,7 +610,7 @@ function fckeditor_admin_profile_form($form_state, $profile = NULL) { '#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 Image Browser. 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.txt for more information.', array('!imce' => url('http://drupal.org/project/imce'), '!ib' => url('http://drupal.org/project/imagebrowser'), '!readme' => url('admin/help/fckeditor'))) + '#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, Image Browser or Web File Manager. 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.txt for more information.', array('!imce' => url('http://drupal.org/project/imce'), '!ib' => url('http://drupal.org/project/imagebrowser'), '!webfm' => url('http://drupal.org/project/webfm'), '!readme' => url('admin/help/fckeditor'))) ); $filebrowsers = array( @@ -626,6 +626,10 @@ function fckeditor_admin_profile_form($form_state, $profile = NULL) { $filebrowsers['ib'] = t('Image Browser'); } + if (module_exists('webfm_popup')) { + $filebrowsers['webfm'] = t('Web File Manager'); + } + $form['fckeditor_upload_settings']['filebrowser'] = array( '#type' => 'select', '#title' => t('File browser type'), @@ -956,7 +960,7 @@ function fckeditor_admin_global_profile_form($form_state, $mode = 'add') { '#description' => t('The path relative to the location of the private directory where FCKeditor should store uploaded files.') .'
'. t('Warning: FCKeditor does not implement any kind of access protection on files available in this location. All files stored in the directory defined above might be accessible by unathenticated users if there is no information about the file in the Drupal\'s database.') .'
'. t('System path to the private folder is: !system_path.', array('!system_path' => realpath(file_directory_path()) . DIRECTORY_SEPARATOR)) .'
'. t('Available wildcard characters:
%u - User ID.') .'
'. t('Current path: !path', array('!path' => $current_private_dir .' ('. file_create_path($current_private_dir) .')')), ); } - + $form['submit'] = array( '#type' => 'submit', '#value' => $btn diff --git a/fckeditor.help.inc b/fckeditor.help.inc index 7aed0bfae6f6b426b76d2da1d94e808fef1f322a..7bc329922d31ef5d4b78c1dff153febcfe2fad6f 100644 --- a/fckeditor.help.inc +++ b/fckeditor.help.inc @@ -100,7 +100,7 @@ function fckeditor_help_delegate($path, $arg) { $output .= '

'. t('There are three ways for uploading files:') .'

'; $output .= '
    '; $output .= '
  1. '. t('By using the built-in file browser.') .'
  2. '; - $output .= '
  3. '. t('By using a module like IMCE or Image Browser.', array('!imce' => 'http://drupal.org/project/imce', '!ib' => 'http://drupal.org/project/imagebrowser')) .'
  4. '; + $output .= '
  5. '. t('By using a module like IMCE, Image Browser or Web File Manager.', array('!imce' => 'http://drupal.org/project/imce', '!ib' => 'http://drupal.org/project/imagebrowser', '!webfm' => 'http://drupal.org/project/webfm')) .'
  6. '; $output .= '
  7. '. t('By using the core upload module.') .'
  8. '; $output .= '
'; diff --git a/fckeditor.module b/fckeditor.module index 407ee289d8b0d4423c550c5373405c823476ed22..341bfcbd65b044cb86d98da4b133ca576959e714 100644 --- a/fckeditor.module +++ b/fckeditor.module @@ -635,6 +635,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 @@ -693,6 +696,16 @@ function fckeditor_process_textarea($element) { $js .= $js_id .".Config['FlashBrowserURL']= '". $host ."index.php?q=imce&app=FCKEditor|url@txtUrl';\n"; 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; + case 'builtin': $js .= $js_id .".Config['LinkBrowser'] = true;\n"; $js .= $js_id .".Config['ImageBrowser'] = true;\n"; @@ -706,8 +719,8 @@ 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';";