summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorontwerpwerk2006-10-13 09:32:55 (GMT)
committer ontwerpwerk2006-10-13 09:32:55 (GMT)
commite2610d9cf0a961168d520585f8b236358b1fa46b (patch)
treec63c06cd2cb42e920a42c24161c048b70601574d
parentb683d2b135a233638d42a81c620efe94a0dba718 (diff)
Media directory instructions added
Used file_directory_path() for file browser root
-rw-r--r--README.txt2
-rw-r--r--fckeditor.module10
2 files changed, 7 insertions, 5 deletions
diff --git a/README.txt b/README.txt
index 6b44519..74bf70d 100644
--- a/README.txt
+++ b/README.txt
@@ -76,7 +76,7 @@ To use the drupal files directory you also need to comment out or remove the
following line in the connector configuration:
//$Config['UserFilesPath'] = '/UserFiles/' ;
-Furthermore, you will need to create a "File", an "Image" and a "Flash"
+Furthermore, you will need to create a "File", "Image", "Flash" and "Media"
subdirectory in your drupal files directory. These directories must have the
same privileges as the drupal files directory. In some cases these
directories must be world writable (chmod 0777).
diff --git a/fckeditor.module b/fckeditor.module
index cc666ab..ebb36db 100644
--- a/fckeditor.module
+++ b/fckeditor.module
@@ -51,7 +51,7 @@ function fckeditor_help($section = '') {
<p>To enable file browsing you need to edit the connector configuration file in your fckeditor module directory, the file should be in:<br /><code>/fckeditor/editor/filemanager/browser/default/connectors/php/config.php</code></p>
<p>In this file you will need to enable the file browser:<br /><code>$ Config['Enabled'] = true;</code></p>
<p>To use the drupal files directory you also need to comment out the following line in the connector configuration:<br /><code>//$ Config['UserFilesPath'] = '/UserFiles/';</code></p>
-<p>Furthermore, you will need to create a <em>'File'</em>, an <em>'Image'</em> and a <em>'Flash'</em> subdirectory in your drupal files directory ('".file_directory_path()."'). These directories must have the same privileges as the drupal files directory. In some cases these directories must be world writable (chmod 0777).</p>";
+<p>Furthermore, you will need to create a <em>'File'</em>, <em>'Image'</em>, <em>'Flash'</em> and <em>'Media'</em> subdirectory in your drupal files directory ('".file_directory_path()."'). These directories must have the same privileges as the drupal files directory. In some cases these directories must be world writable (chmod 0777).</p>";
break;
}
return $output;
@@ -211,6 +211,8 @@ function fckeditor_process_textarea($element) {
// setting some variables
$module_drupal_path = drupal_get_path('module', 'fckeditor');
$module_full_path = base_path() . $module_drupal_path;
+ // get the default drupal files path
+ $files_path = file_directory_path();
// '-' in a javascript id will not work
$js_id = 'oFCKeditor_' . str_replace('-', '_', $element['#id']);
@@ -242,9 +244,9 @@ var ".$js_id." = new FCKeditor( '".$element['#id']."' );
// add code for filebrowser for users that have access
if (user_access('allow fckeditor file uploads')) {
- $element['#suffix'] .= $js_id.".Config['LinkBrowserURL'] = '".$module_full_path."/fckeditor/editor/filemanager/browser/default/browser.html?Connector=connectors/php/connector.php&ServerPath=/".variable_get("file_directory_path", 'files')."';
-".$js_id.".Config['ImageBrowserURL'] = '".$module_full_path."/fckeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector=connectors/php/connector.php&ServerPath=/".variable_get("file_directory_path", 'files')."';
-".$js_id.".Config['FlashBrowserURL'] = '".$module_full_path."/fckeditor/editor/filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/php/connector.php&ServerPath=/".variable_get("file_directory_path", 'files')."';
+ $element['#suffix'] .= $js_id.".Config['LinkBrowserURL'] = '".$module_full_path."/fckeditor/editor/filemanager/browser/default/browser.html?Connector=connectors/php/connector.php&ServerPath=/".$files_path."';
+".$js_id.".Config['ImageBrowserURL'] = '".$module_full_path."/fckeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector=connectors/php/connector.php&ServerPath=/".$files_path."';
+".$js_id.".Config['FlashBrowserURL'] = '".$module_full_path."/fckeditor/editor/filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/php/connector.php&ServerPath=/".$files_path."';
".$js_id.".Config['LinkUpload'] = false;
".$js_id.".Config['ImageUpload'] = false;
".$js_id.".Config['FlashUpload'] = false;\n";