summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWiktor Walc2009-03-11 12:47:29 (GMT)
committer Wiktor Walc2009-03-11 12:47:29 (GMT)
commitfc56e55f19c9c46075f2285fe6d59387a723f709 (patch)
treeb4238eb8453f1460ba3c6539f36787f8581a248e
parent13834bc8a5a3690266d155218c85b4d3fcf083a0 (diff)
#379088 Added support for Web File Manager (WebFM)
-rw-r--r--CHANGELOG.txt1
-rw-r--r--fckeditor.module34
2 files changed, 27 insertions, 8 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 388a46b..7cdee75 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 ddb104b..248c0d9 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('<h3>Uploading images and files</h3><p>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.</p>',
+ $output .= t('<h3>Uploading images and files</h3><p>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.</p>',
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.<br />',
- 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'),
)
- )
+ ) .'<br />'
);
$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,