summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.txt38
-rw-r--r--README.txt219
-rw-r--r--fckeditor.config.js78
-rw-r--r--fckeditor.css24
-rw-r--r--fckeditor.info1
-rw-r--r--fckeditor.install169
-rw-r--r--fckeditor.module1413
-rw-r--r--fckeditor.popup.html1
-rw-r--r--fckeditor.popup.js3
-rw-r--r--fckeditor.utils.js171
-rw-r--r--plugins/drupalbreak/drupalbreak.gifbin0 -> 1172 bytes
-rw-r--r--plugins/drupalbreak/fckplugin.js198
-rw-r--r--plugins/drupalbreak/lang/en.js1
-rw-r--r--plugins/drupalpagebreak/drupalpagebreak.gifbin0 -> 880 bytes
-rw-r--r--plugins/drupalpagebreak/fckplugin.js181
-rw-r--r--plugins/drupalpagebreak/lang/en.js1
-rw-r--r--po/fckeditor.pot553
-rw-r--r--po/it.po282
-rw-r--r--po/nl.po202
-rw-r--r--po/pl.po553
20 files changed, 3844 insertions, 244 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
new file mode 100644
index 0000000..faabfa7
--- /dev/null
+++ b/CHANGELOG.txt
@@ -0,0 +1,38 @@
+$Id$
+
+-- 2007-11-15 version drupal-6-x-1-0-dev
+* ported 5.x-2.x module
+* improved teaser plugin integration (break button is enabled by default)
+
+-- 2007-10-26 version drupal-5-x-2-0-dev
+* new version number 2.0
+* user settings are grouped into profiles, so it is possible now to disable FCKeditor for admin.
+* each user may adjust his own settings (e.g disable/enable toggle, choose language, toolbar, skin etc.)
+* added new way of enabling/disabling FCKeditor (toggle)
+* much much more configuration options are now available
+* module uses built-in function in FCKeditor to check browser compatibility
+ so as Opera and Safari are now supported (since FCKeditor 2.5, Opera 9.5 and Safari 3.0)
+* FCkeditor module comes now with two plugins for teaser break and pagebreak
+* updated the readme file
+* added polish translation
+
+-- 2007-08-03 version drupal-5-x-1-3-beta
+* new version number 1.3
+
+-- 2007-08-03 version drupal-5-x-1-2-dev
+* Added link to settings for easier navigation
+ - http://drupal.org/node/125520
+* Add custom xml stylesheet if it exists.
+ - http://drupal.org/node/133259
+* Integrate IMCE if it exists and is prefered - and some more logic
+ for the configuration
+ - http://drupal.org/node/119008
+* changed the wording of some options
+ - http://drupal.org/node/117860
+* Added path exclusion mode
+ - Notice: you must re-save your settings if you used path inclusion
+ in the previous version
+* Added some more comments for people who like to see what goes on
+* Updated the readme
+* Started this changelog, for older changes uhm...
+ they're in cvs I guess
diff --git a/README.txt b/README.txt
index 642119b..5ae98ad 100644
--- a/README.txt
+++ b/README.txt
@@ -2,16 +2,16 @@ $Id$
Overview
--------
-This module allows Drupal to replace textarea fields with the FCKeditor.
-This HTML text editor brings many of the powerful functionalities of
-known desktop editors like Word to the web. It's relatively lightweight
-and doesn't require any kind of installation on the client computer.
+This module allows Drupal to replace textarea fields with the
+FCKeditor.
+This HTML text editor brings many of the powerful functions of known
+desktop editors like Word to the web. It's relatively lightweight and
+doesn't require any kind of installation on the client computer.
Compatibility
-------------
-At the moment the CVS version will work in Drupal 4.7 But the integrated
-File Browser needs a bit of manual configuration, more information
-about this is in the included readme.txt file
+The integrated File Browser needs a bit of manual configuration,
+more information about this in the included in this readme.txt file
Required components
-------------------
@@ -33,67 +33,196 @@ Requirements
------------
- Drupal 5.x
- PHP 4.3.0 or greater
- - FCKeditor 2.3.x (http://www.fckeditor.net/)
+ - FCKeditor 2.3.x or greater (http://www.fckeditor.net/)
Installation
------------
1. Copy the module fckeditor folder to modules/.
- 2. Download FCKeditor 2.x from http://www.fckeditor.net and copy the
- distribution files (the contents of the "fckeditor" directory from
- the FCKeditor distribution file) to modules/fckeditor/fckeditor.
+ 2. Download FCKeditor from http://www.fckeditor.net and copy
+ the distribution files (the contents of the "fckeditor" directory
+ from the FCKeditor distribution file) to
+ modules/fckeditor/fckeditor.
+
+ A quick check to see if it is correct: the files 'COPY_HERE.txt',
+ 'fckconfig.js' and also the directory 'editor' must exist in the
+ same directory,
+
+ The correct directory structure is as follows:
+
+ modules
+ |--fckeditor
+ |--fckeditor
+ |--_samples
+ |--editor
+
3. See 'How to enable the File Browser' for additional instructions.
+ Also read the security note in this readme
+
+ Alternatives to the built-in file browser are the IMCE module and
+ copying the image url into the url textfield.
+
Configuration
-------------
- 1. Modify the fckeditor.config.js file to custom your needs (optional).
+ 1. Modify the fckeditor.config.js file to customize the toolbars to
+ your needs (optional).
+
+ You may also copy the needed configuration lines from the default
+ FCKeditor configuration settings
+ (modules/fckeditor/fckeditor/fckconfig.js), the lines in
+ fckeditor.config.js will override most settings.
+
+ It is not advised to change the default toolbars in the
+ configuration settings (modules/fckeditor/fckeditor/fckconfig.js)
+ because those are included in the FCKeditor package and might
+ change without notice when you update the editor.
+
2. Enable the module as usual from Drupal's admin pages.
- 3. Under settings, configure the fckeditor settings.
- 4. Grant permissions for use of FCKeditor in Administer > Access Control
- 5. For the Rich Text Editing to work you also need to configure your
- filters for the users that may access Rich Text Editing. Either grant
- those users Full HTML access or use the following:
- <a> <em> <strong> <small> <sup> <sub> <cite> <blockquote> <code>
- <ul> <ol> <li> <dl> <dt> <dd> <h2> <h3> <h4> <img> <br> <br /> <p>
- <div> <span> <b> <i>
- Users that need access to tables might be better of using Full HTML
+
+ 3. Grant permissions for use of FCKeditor in
+ Administer > User Management > Access Control
+
+ 4. Under Administer > Settings > FCKeditor, create the fckeditor
+ profiles. In each profile you can choose which textareas will be replaced by
+ FCKeditor, select default toolbar and configure some more advanced
+ settings.
-Security
---------
-Note that enabling file uploads is a security risk. That's why there is a
-separate permission in Administer > Access Control for enabling the file
-browser to certain groups.
-
-How to enable the File Browser (in FCKeditor 2.3.x)
+ 5. For the Rich Text Editing to work you also need to configure your
+ filters for the users that may access Rich Text Editing. Either
+ grant those users Full HTML access or use the following:
+
+ <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area>
+ <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em>
+ <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote>
+ <pre> <address> <code> <cite> <embed> <object> <strike> <caption>
+
+ 6. To have a better control over line breaks, you may disable "Line break converter"
+ in the chosen filter.
+
+How to enable the File Browser
---------------------------------------------------
-The editor gives the end user the flexibility to create a custom file browser
-that can be integrated on it. The included file browser allows users to view
-the content of a specific directory on the server and add new content to
-that directory (create folders and upload files).
+The editor gives the end user the flexibility to create a custom file
+browser that can be integrated on it. The included file browser allows
+users to view the content of a specific directory on the server and
+add new content to that directory (create folders and upload files).
-To enable the file browser you need to edit the connector configuration file in
-your fckeditor module directory, the file should be in:
-/fckeditor/editor/filemanager/browser/default/connectors/php/config.php
+To enable the file browser you need to edit the connector
+configuration file in your fckeditor module directory, the file should
+be in:
+/modules/fckeditor/fckeditor/editor/filemanager/browser/default/connectors/php/config.php
+and
+/modules/fckeditor/fckeditor/editor/filemanager/upload/php/config.php
+(FCKeditor 2.3.x - 2.4.x)
-In this file you will need to enable the file browser:
- $Config['Enabled'] = true ;
+or
-To use the drupal files directory you also need to comment out or remove the
-following line in the connector configuration:
- //$Config['UserFilesPath'] = '/UserFiles/' ;
+/modules/fckeditor/fckeditor/editor/filemanager/connectors/php/config.php
+(FCKeditor 2.5+)
-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).
+In this file you will need to enable the file browser:
+$Config['Enabled'] = true ;
+
+To use the drupal files directory you also need to adjust the following
+variables in the connector configuration:
+ $Config['UserFilesPath']
+and:
+ $Config['UserFilesAbsolutePath']
+
+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).
+Security
+--------
+Note that enabling file uploads is a security risk. That's why there
+is a separate permission in Administer > Access Control for enabling
+the file browser to certain groups.
+
+Making File Browser more secure
+-------------------------------
+Please be aware that enabling file browser simply by setting
+ $Config['Enabled'] = true ;
+theoretically enables it for each user (with a little bit of hackery,
+it is possible to use file browser without appropiate Drupal permissions).
+The more secure way of enabling file browser:
+
+ 1. instead of setting
+ $Config['Enabled'] = true ;
+ add the following code:
+
+ $drupal_path = "../../../../../../../../..";
+ if(!file_exists($drupal_path . '/includes/bootstrap.inc')) {
+ $drupal_path = "../..";
+ do {
+ $drupal_path .= "/..";
+ $depth = substr_count($drupal_path, "..");
+ false;
+ }
+ while(!($bootstrapFileFound = file_exists($drupal_path . '/includes/bootstrap.inc')) && $depth<10);
+ }
+ if (!isset($bootstrapFileFound) || $bootstrapFileFound) {
+ $cwd = getcwd();
+ chdir($drupal_path);
+ require_once './includes/bootstrap.inc';
+ drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
+ $Config['Enabled'] = user_access('allow fckeditor file uploads');
+ chdir($cwd);
+ }
+
+ straight after
+ $Config['Enabled'] = false ;
+
+ This code enables file browser only to users that have "allow fckeditor file uploads" permission.
+ note: if you don't set $drupal_path correctly, FCKeditor will find it out by itself.
+
+ 2. as of Drupal 5.2, additional step is required:
+ locate file named settings.php inside your drupal directory
+ (usually sites/default/settings.php)
+ and set $cookie_domain variable to the appropiate domain.
+ (remember to uncomment that line)
+
+Plugins: Teaser break and Pagebreak
+-----------------------------------
+By default, FCKeditor module comes with two plugins that can handle teaser break (<!--break-->) and pagebreak (<!--pagebreak-->).
+You can enable any (or even both) of them.
+To do this, open fckeditor.config.js and uncomment these three lines:
+
+ FCKConfig.PluginsPath = '../../plugins/' ;
+ FCKConfig.Plugins.Add( 'drupalbreak' ) ;
+ FCKConfig.Plugins.Add( 'drupalpagebreak' )
+
+The second step is to add the buttons to toolbar (in the same file).
+The button names are: DrupalBreak, DrupalPageBreak;
+
+For example if you have a toolbar with an array of buttons defined as follows:
+ ['Image','Flash','Table','Rule','SpecialChar']
+simply add those two buttons at the end of array:
+ ['Image','Flash','Table','Rule','SpecialChar', 'DrupalBreak', 'DrupalPageBreak']
+(remember about single quotes).
+
+Help & Contribution
+-------------------
+If you are looking for more information, have any troubles in configuration or if
+you found an issue, please visit the official project page:
+ http://drupal.org/project/fckeditor
+
+We would like to encourage you to join our team if you can help in any way.
+If you can translate FCKeditor module, please use fckeditor.pot file as a template
+(located in "po" directory) and send us the translated file so that we could attach it.
+Any help is appreciated.
+
Credits
-------
- FCKeditor for Drupal Core functionality originally written by:
Frederico Caldeira Knabben
Jorge Tite (LatPro Inc.)
- - FCKeditor for Drupal 5.x
+ - FCKeditor for Drupal 5.x originally written by:
Ontwerpwerk (www.ontwerpwerk.nl)
+
+ - FCKeditor for Drupal 5.x is currently maintained by FCKeditor team.
+ http://www.fckeditor.net/
- FCKeditor - The text editor for internet
Copyright (C) 2003-2006 Frederico Caldeira Knabben
diff --git a/fckeditor.config.js b/fckeditor.config.js
index e7c75b8..90c1ecd 100644
--- a/fckeditor.config.js
+++ b/fckeditor.config.js
@@ -1,26 +1,78 @@
// $Id$
+
+/*
+ Define as many toolbars as you need, you can change toolbar names
+ DrupalBasic will be forced on some smaller textareas (if enabled)
+ if you change the name of DrupalBasic, you have to update
+ FCKEDITOR_FORCE_SIMPLE_TOOLBAR_NAME in fckeditor.module
+ */
+
+/*
+ This toolbar is dedicated to users with "Full HTML" access
+ some of commands used here (like 'FontName') use inline styles,
+ which unfortunately are stripped by "Filtered HTML" filter
+ */
FCKConfig.ToolbarSets["DrupalFull"] = [
- ['Source'],
- ['Cut','Copy','Paste','PasteText','PasteWord'],
- ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
- ['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'],
- ['OrderedList','UnorderedList','-','Outdent','Indent'],
- ['JustifyLeft','JustifyCenter','JustifyRight'],
- ['Link','Unlink','Anchor'],
- ['Image','Flash','Table','Rule','SpecialChar','PageBreak','UniversalKey'],
- '/',
- ['FontFormat'],
- ['TextColor','BGColor']
+['Source'],
+['Cut','Copy','Paste','PasteText','PasteWord'],
+['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
+['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'],
+['OrderedList','UnorderedList','-','Outdent','Indent'],
+//as of FCKeditor 2.5 you can use also 'Blockquote' button
+//['OrderedList','UnorderedList','-','Outdent','Indent','Blockquote'],
+['JustifyLeft','JustifyCenter','JustifyRight'],
+['Link','Unlink','Anchor'],
+['Image','Flash','Table','Rule','SpecialChar','DrupalBreak'],
+//uncomment this line to enable teaser break and page break buttons
+//['Image','Flash','Table','Rule','SpecialChar','DrupalBreak','DrupalPageBreak'],
+'/',
+['FontFormat','FontName','FontSize'],
+['TextColor','BGColor']
] ;
FCKConfig.ToolbarSets["DrupalBasic"] = [
- ['FontFormat','-','Bold','Italic','-','OrderedList','UnorderedList','-','Link','Unlink', 'Image']
+['FontFormat','-','Bold','Italic','-','OrderedList','UnorderedList','-','Link','Unlink', 'Image']
+] ;
+
+//This toolbar should work fine with "Filtered HTML" filter
+FCKConfig.ToolbarSets["DrupalFiltered"] = [
+['Source'],
+['Cut','Copy','Paste','PasteText','PasteWord'],
+['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
+//as of FCKeditor 2.5 you can use also 'Blockquote' button
+//['OrderedList','UnorderedList','-','Outdent','Indent','Blockquote'],
+['Link','Unlink','Anchor'],
+['Image','Flash','Table','Rule','Smiley','SpecialChar'],
+'/',
+['FontFormat'],
+['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'],
+['OrderedList','UnorderedList','-','Outdent','Indent'],
+['JustifyLeft','JustifyCenter','JustifyRight','DrupalBreak'],
] ;
+//as of FCKeditor 2.5 ShowBlocks command is available
+if ( FCK.GetData ) {
+ FCKConfig.ToolbarSets["DrupalFull"][10].push('ShowBlocks') ;
+ FCKConfig.ToolbarSets["DrupalFiltered"][9].push('ShowBlocks') ;
+}
// Protect PHP code tags (<?...?>) so FCKeditor will not break them when
// switching from Source to WYSIWYG.
-// Uncomment this line doesn't mean the user will not be able to type PHP
+// Uncommenting this line doesn't mean the user will not be able to type PHP
// code in the source. This kind of prevention must be done in the server side
// (as does Drupal), so just leave this line as is.
FCKConfig.ProtectedSource.Add( /<\?[\s\S]*?\?>/g ) ; // PHP style server side code
+//uncomment these three lines to enable teaser break and page break plugins
+//remember to add 'DrupalBreak' and 'DrupalPageBreak' buttons to the toolbar
+FCKConfig.PluginsPath = '../../plugins/' ;
+FCKConfig.Plugins.Add( 'drupalbreak' ) ;
+//FCKConfig.Plugins.Add( 'drupalpagebreak' ) ;
+
+var _FileBrowserLanguage = 'php' ;
+var _QuickUploadLanguage = 'php' ;
+
+// This overrides the IndentLength/IndentUnit settings.
+FCKConfig.IndentClasses = ['rteindent1','rteindent2','rteindent3','rteindent4'] ;
+
+// [ Left, Center, Right, Justified ]
+FCKConfig.JustifyClasses = ['rteleft','rtecenter','rteright','rtejustified'] ;
diff --git a/fckeditor.css b/fckeditor.css
new file mode 100644
index 0000000..1f65cb3
--- /dev/null
+++ b/fckeditor.css
@@ -0,0 +1,24 @@
+.rteindent1 {
+ margin-left: 40px;
+}
+.rteindent2 {
+ margin-left: 80px;
+}
+.rteindent3 {
+ margin-left: 120px;
+}
+.rteindent4 {
+ margin-left: 160px;
+}
+.rteleft {
+ text-align: left;
+}
+.rteright {
+ text-align: right;
+}
+.rtecenter {
+ text-align: center;
+}
+.rtejustify {
+ text-align: justify;
+} \ No newline at end of file
diff --git a/fckeditor.info b/fckeditor.info
index 15c9fe4..b563aff 100644
--- a/fckeditor.info
+++ b/fckeditor.info
@@ -1,4 +1,3 @@
; $Id$
name = FCKeditor
description = "Enables the usage of FCKeditor (WYSIWYG) instead of plain text fields."
-package = Input helpers
diff --git a/fckeditor.install b/fckeditor.install
new file mode 100644
index 0000000..691a7d4
--- /dev/null
+++ b/fckeditor.install
@@ -0,0 +1,169 @@
+<?php
+// $Id$
+
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2003-2007 Frederico Caldeira Knabben
+ *
+ * == BEGIN LICENSE ==
+ *
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ *
+ * - GNU General Public License Version 2 or later (the "GPL")
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ * - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ * http://www.gnu.org/licenses/lgpl.html
+ *
+ * - Mozilla Public License Version 1.1 or later (the "MPL")
+ * http://www.mozilla.org/MPL/MPL-1.1.html
+ *
+ * == END LICENSE ==
+
+ * Implementation of hook_install()
+ *
+ * This will automatically install the database tables for the FCKeditor module for both the MySQL and PostgreSQL databases.
+ *
+ * If you are using another database, you will have to install the tables by hand, using the queries below as a reference.
+ *
+ * Note that the curly braces around table names are a drupal-specific feature to allow for automatic database table prefixing,
+ * and will need to be removed.
+ */
+function fckeditor_install() {
+
+ drupal_install_schema('fckeditor');
+
+ //create two default roles based on previous settings
+ db_query("INSERT INTO {fckeditor_role} (name, rid) VALUES ('%s', %d)",
+ "Default", defined('DRUPAL_ANONYMOUS_RID') ? DRUPAL_ANONYMOUS_RID : 1);
+ db_query("INSERT INTO {fckeditor_role} (name, rid) VALUES ('%s', %d)",
+ "Advanced", defined('DRUPAL_AUTHENTICATED_RID') ? DRUPAL_AUTHENTICATED_RID : 2);
+
+ //insert settings for default role
+ $arr = array();
+ $arr['allow_user_conf'] = "f";
+ $arr['min_rows'] = variable_get('fckeditor_minimum_rows', 1);
+ $arr['excl_mode'] = variable_get('fckeditor_exclude_toggle', 0);
+
+ //exclude by default some known textareas where HTML is not expected
+ //edit-recipients //contact module
+ //edit-reply //contact module
+ //edit-description //taxonomy module
+ //edit-synonyms //taxonomy module
+ //edit-img-assist-textareas //img assist module
+ $arr['excl_list'] = variable_get("fckeditor_exclude",
+ "edit-user-mail-welcome-body\n".
+ "edit-user-mail-admin-body\n".
+ "edit-user-mail-approval-body\n".
+ "edit-user-mail-pass-body\n".
+ "edit-user-mail-register-admin-created-body\n".
+ "edit-user-mail-register-no-approval-required-body\n".
+ "edit-user-mail-register-pending-approval-body\n".
+ "edit-user-mail-password-reset-body\n".
+ "edit-user-mail-status-activated-body\n".
+ "edit-user-mail-status-blocked-body\n".
+ "edit-user-mail-status-deleted-body\n".
+ "edit-recipients\n".
+ "edit-reply\n".
+ "edit-description\n".
+ "edit-synonyms\n".
+ "edit-img-assist-textareas\n"
+ );
+
+ //force by default simple toolbar on selected textareas
+ $arr['simple_incl_mode'] = 1;
+ $arr['simple_incl_list'] =
+ "edit-signature\n".
+ "edit-site-mission\n".
+ "edit-site-footer\n".
+ "edit-site-offline-message\n".
+ "edit-page-help\n".
+ "edit-user-registration-help\n".
+ "edit-user-picture-guidelines\n";
+
+ //appearance
+ $arr['default'] = "t";
+ $arr['show_toggle'] = "t";
+ $arr['popup'] = variable_get('fckeditor_popup', 0) ? "t" : "f";
+ $arr['skin'] = "default";
+ $arr['toolbar'] = variable_get('fckeditor_default_toolbar', 'DrupalBasic');
+ $arr['expand'] = variable_get('fckeditor_toolbar_start_expanded', 1) ? "t" : "f";
+ $arr['width'] = variable_get("fckeditor_width", "100%");
+ $arr['lang'] = "en";
+ $arr['auto_lang'] = "t";
+
+ //output
+ $arr['enter_mode'] = "p";
+ $arr['shift_enter_mode'] = "br";
+ $arr['font_format'] = 'p;div;pre;address;h1;h2;h3;h4;h5;h6';
+ $arr['format_source'] = "t";
+ $arr['format_output'] = "t";
+
+ //css
+ $arr['css_mode'] = "theme";
+ $arr['css_path'] = variable_get("fckeditor_stylesheet", "");
+
+ //upload
+ //get permissions here like in _update_role_permissions
+ $arr['upload_basic'] = variable_get("fckeditor_upload_basic", 0) ? "t" : "f";
+ $arr['upload_advanced'] = variable_get('fckeditor_upload_advanced', 0) ? "t" : "f";
+ $arr['user_choose'] = "f";
+
+ db_query("INSERT INTO {fckeditor_settings} (name, settings) VALUES ('%s', '%s')", "Default", serialize($arr));
+
+ //insert settings for advanced role
+ $arr['toolbar'] = variable_get('fckeditor_advanced_toolbar', 'DrupalFiltered');
+ db_query("INSERT INTO {fckeditor_settings} (name, settings) VALUES ('%s', '%s')", "Advanced", serialize($arr));
+}
+
+/**
+* Implementation of hook_schema().
+*/
+function fckeditor_schema() {
+ $schema['fckeditor_settings'] = array(
+ 'description' => t('Stores FCKeditor profile settings'),
+ 'fields' => array(
+ 'name' => array(
+ 'type' => 'varchar',
+ 'not null' => TRUE,
+ 'default' => '',
+ 'length' => 128,
+ 'description' => t('Name of the FCKeditor profile'),
+ ),
+ 'settings' => array(
+ 'type' => 'text',
+ 'description' => t('Profile settings'),
+ ),
+ ),
+ 'primary key' => array('name'),
+ );
+ $schema['fckeditor_role'] = array(
+ 'description' => t('Stores FCKeditor profile assignments'),
+ 'fields' => array(
+ 'name' => array(
+ 'type' => 'varchar',
+ 'not null' => TRUE,
+ 'default' => '',
+ 'length' => 128,
+ 'description' => t('Name of the FCKeditor role'),
+ ),
+ 'rid' => array(
+ 'type' => 'int',
+ 'not null' => TRUE,
+ 'default' => 0,
+ 'description' => t('Drupal role id'),
+ ),
+ ),
+ 'primary key' => array('name', 'rid'),
+ );
+
+ return $schema;
+}
+
+/**
+ * Implementation of hook_uninstall()
+ */
+function fckeditor_uninstall() {
+ drupal_uninstall_schema('fckeditor');
+}
diff --git a/fckeditor.module b/fckeditor.module
index 92d3bc8..c6e6b40 100644
--- a/fckeditor.module
+++ b/fckeditor.module
@@ -1,64 +1,141 @@
<?php
// $Id$
-/**
- * @file
- * FCKeditor Module for Drupal 5.x
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
- * This module allows Drupal to replace textarea fields with FCKeditor.
+ * == BEGIN LICENSE ==
*
- * This HTML text editor brings to the web many of the powerful functionalities
- * of known desktop editors like Word. It's really lightweight and doesn't
- * require any kind of installation on the client computer.
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
*
- * ----------------------------------------------------------------------------
+ * - GNU General Public License Version 2 or later (the "GPL")
+ * http://www.gnu.org/licenses/gpl.html
*
- * FCKeditor - The text editor for internet
- * Copyright (C) 2003-2006 Frederico Caldeira Knabben
+ * - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ * http://www.gnu.org/licenses/lgpl.html
*
- * Licensed under the terms of the GNU Lesser General Public License:
- * http://www.opensource.org/licenses/lgpl-license.php
+ * - Mozilla Public License Version 1.1 or later (the "MPL")
+ * http://www.mozilla.org/MPL/MPL-1.1.html
*
- * For further information visit:
- * http://www.fckeditor.net/
+ * == END LICENSE ==
*
- * ----------------------------------------------------------------------------
+ * @file
+ * FCKeditor Module for Drupal 5.x
+ *
+ * This module allows Drupal to replace textarea fields with FCKeditor.
*
- * @version 1.0
- * @author LatPro Inc (George)
- * @version 1.1
- * @author Frederico Caldeira Knabben (www.fckeditor.net)
- * @version 1.2
- * @author Ontwerpwerk (www.ontwerpwerk.nl)
+ * This HTML text editor brings to the web many of the powerful functionalities
+ * of known desktop editors like Word. It's really lightweight and doesn't
+ * require any kind of installation on the client computer.
*/
+/**
+ * The name of simplified toolbar which should be forced
+ * Be sure that this toolbar is defined in fckeditor.config.js or fckconfig.js
+ */
+define('FCKEDITOR_FORCE_SIMPLE_TOOLBAR_NAME', 'DrupalBasic') ;
/**
* Implementation of hook_help
*/
-function fckeditor_help($section = '') {
- switch ($section) {
+function fckeditor_help($path, $arg) {
+ switch ($path) {
case 'admin/settings/help#description':
$output = t("Enables the usage of FCKeditor (WYSIWYG editor) instead of plain text fields.");
break;
+ case 'admin/settings/fckeditor/edit/Default':
+ $output = t("<p>Note: FCKeditor is highly configurable. The most commonly used features are listed below. If you want to take a look at all available settings, open <code>!fckconfig</code> and then customize <code>!fckeditor_config</code> to your needs. This is also the only way to define new toolbar sets. It is advised to not edit <code>fckconfig.js</code> because you may overwrite it accidentally when you update the editor.</p>", array('!fckconfig' =>drupal_get_path('module', 'fckeditor')."/fckeditor/fckconfig.js", '!fckeditor_config'=>drupal_get_path('module', 'fckeditor')."/fckeditor.config.js"));
+ break;
case 'admin/settings/fckeditor':
- $output = t("<p>The FCKeditor module allows Drupal to replace textarea fields with a rich text or <acronym title=\"What You See Is What You Get\">WYSIWYG</acronym> editor. This editor brings many of the powerful functionalities of known desktop editors like Word to the web. It's relatively lightweight and doesn't require any kind of installation on the client computer.</p>
-<p>More information is located at the !fckeditorlink. A small user guide is located at !userguidelink.</p>", array('!fckeditorlink'=>l(t('FCKeditor homepage'), 'http://www.fckeditor.net'), '!userguidelink'=>l(t('FCKeditor userguide'), 'http://wiki.fckeditor.net/UsersGuide')));
- $output .= "<div class=\"more-link\">".l('more help...','admin/help/fckeditor')."</div>";
+ $output = t("<p>The FCKeditor module allows Drupal to replace textarea fields with a rich text or <acronym title=\"What You See Is What You Get\">WYSIWYG</acronym> editor. This editor brings many of the powerful functionalities of known desktop editors like Word to the web. It's relatively lightweight and doesn't require any kind of installation on the client computer.</p><p>More information is located at the !fckeditorlink. A small user guide is located at !userguidelink.</p>",
+ array(
+ '!fckeditorlink' => l(t('FCKeditor homepage'), 'http://www.fckeditor.net'),
+ '!userguidelink' => l(t('FCKeditor userguide'), 'http://wiki.fckeditor.net/UsersGuide'))
+ );
+ $output .= t('<p>Profiles can be defined based on user roles. A FCKeditor profile can define which pages receive this FCKeditor capability, what buttons or themes are enabled for the editor, how the editor is displayed, and a few other editor functions.</p><p>Lastly, only users with the <code>!access1</code> <a href="!url">permission</a> will be able to use FCKeditor.</p>', array('!url' => url('admin/user/permissions'), '!access1' => t('access fckeditor')));
break;
case 'admin/help#fckeditor':
- $output = t("<p>The FCKeditor module allows Drupal to replace textarea fields with a rich text or <acronym title=\"What You See Is What You Get\">WYSIWYG</acronym> editor. This editor brings many of the powerful functionalities of known desktop editors like Word to the web. It's relatively lightweight and doesn't require any kind of installation on the client computer.</p>
-<p>More information is located at the !fckeditorlink. A small user guide is located at !userguidelink.</p>", array('!fckeditorlink'=>l(t('FCKeditor homepage'), 'http://www.fckeditor.net'), '!userguidelink'=>l(t('FCKeditor userguide'), 'http://wiki.fckeditor.net/UsersGuide')));
- $output .= t('<h3>Configuration</h3>
-<p>For the Rich Text Editing to work you also need to configure your !filterlink for the users that may access Rich Text Editing. Either grant those users Full HTML access or use the following: <code>!filter</code>. Users that need access to tables might be better of using Full HTML.</p>', array('!filter'=>htmlentities('<a> <em> <strong> <small> <sup> <sub> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd> <h2> <h3> <h4> <img> <br> <br /> <p> <div> <span> <b> <i>'), '!filterlink'=> l(t('filters'),'admin/filters')));
- $output .= t('<h3>Security</h3>
-<p>Note that enabling file uploads is a security risk, please take care about to who and when you will grant access.</p>');
+ $output = t("<p>The FCKeditor module allows Drupal to replace textarea fields with a rich text or <acronym title=\"What You See Is What You Get\">WYSIWYG</acronym> editor. This editor brings many of the powerful functionalities of known desktop editors like Word to the web. It's relatively lightweight and doesn't require any kind of installation on the client computer.</p><p>More information is located at the !fckeditorlink. A small user guide is located at !userguidelink.</p>",
+ array(
+ '!fckeditorlink' => l(t('FCKeditor homepage'), 'http://www.fckeditor.net'),
+ '!userguidelink' => l(t('FCKeditor userguide'), 'http://wiki.fckeditor.net/UsersGuide'))
+ );
+ $output .= t('<h3>Installation</h3><p>Go to the !fckeditorlink and download the latest version. Then uncompress the contents of the "fckeditor" directory of the downloaded file to %fckeditordir.</p>',
+ array(
+ '!fckeditorlink' => l(t('FCKeditor homepage'), 'http://www.fckeditor.net'),
+ '%fckeditordir' => base_path() . drupal_get_path('module', 'fckeditor') .'/fckeditor/')
+ );
+ $output .= t('<h3>Installation troubleshooting</h3><p>If your FCKeditor does not show you must check if all files are extracted correctly. The directory %fckeditordir should have the following files <code>fckeditor.js, fckconfig.js, fckstyles.xml, fcktemplates.xml</code> and a directory named <code>editor</code>.</p>',
+ array(
+ '!fckeditorlink' => l(t('FCKeditor homepage'), 'http://www.fckeditor.net'),
+ '%fckeditordir' => base_path() . drupal_get_path('module', 'fckeditor') .'/fckeditor/')
+ );
+ $output .= t('The correct directory structure is as follows: <pre>!structure</pre>',array(
+ '!structure'=>"modules\n fckeditor\n <em>fckeditor.module</em>\n fckeditor\n _samples\n editor\n <em>COPY_HERE.txt</em>\n <em>fckconfig.js</em>\n ..."
+ ));
+ $output .= t('<h3>Configuration</h3><ol><li>Modify the fckeditor.config.js file to custom your needs (optional).<br />You may copy the needed configuration lines from the default FCKeditor configuration settings (modules/fckeditor/fckeditor/fckconfig.js), the lines in fckeditor.config.js will override most settings.</li><li>Enable the module as usual from Drupal\'s admin pages.</li><li>Grant permissions for use of FCKeditor in <code>!path2</code></li><li>Under <code>!path1</code>, create the fckeditor profiles. In each profile you can choose which textareas will be replaced by FCKeditor, select default toolbar and configure some more advanced settings </li><li>For the Rich Text Editing to work you also need to configure your !filterlink for the users that may access Rich Text Editing. Either grant those users Full HTML access or use the following: <br/><code>!filter</code>. </li><li>To have a better control over line breaks, you may disable <code>Line break converter</code> in the chosen filter.</li></ol>',
+ array(
+ '!path1' => l(t('Administer > Settings > FCKeditor'),'admin/settings/fckeditor'),
+ '!path2' => l(t('Administer > User Management > Access Control'),'admin/user/permissions'),
+ '!filter' => htmlentities('<a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area>
+ <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em>
+ <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote>
+ <pre> <address> <code> <cite> <embed> <object> <strike> <caption>'),
+ '!filterlink'=> l(t('filters'), 'admin/settings/filters'))
+ );
+ $output .= t("<h3>Plugins: Teaser break and Pagebreak</h3><p>By default, FCKeditor module comes with two plugins that can handle teaser break (&lt;!--break--&gt;) and pagebreak (&lt;!--pagebreak--&gt;). You can enable any (or even both) of them.<ol><li>Open <code>!fckeditor.config.js</code> and uncomment these three lines: <pre>!code</pre></li><li>The second step is to add buttons to the toolbar (in the same file). The button names are: <code>DrupalBreak, DrupalPageBreak</code>. For example if you have a toolbar with an array of buttons defined as follows: <pre>!buttons1</pre> simply add those two buttons at the end of array: <pre>!buttons2</pre> (remember about single quotes).</li></ol></p>",
+ array(
+ '!fckeditor.config.js' => base_path() . drupal_get_path('module', 'fckeditor') . 'fckeditor.config.js',
+ '!code' => "
+ FCKConfig.PluginsPath = '../../plugins/' ;
+ FCKConfig.Plugins.Add( 'drupalbreak' ) ;
+ FCKConfig.Plugins.Add( 'drupalpagebreak' ) ;
+",
+ '!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 a module like !imce or using the core upload module.</p>',
+ array(
+ '!imce' => l(t('IMCE'), 'http://drupal.org/project/imce')
+ )
+ );
+ $output .= t('<h3>Security</h3><p>Note that enabling file uploads is <strong>a security risk</strong>. That\'s why there is a !link in Administer > User Management > Access Control for enabling the file browser to certain groups.</p>', array('!link' => l(t('separate permission'),'admin/user/permissions')));
// the rest is untranslated for the moment
- $output .= "<h3>How to enable the file browser (in FCKeditor 2.3.x)</h3>
-<p>The editor gives the end user the flexibility to create a custom file browser that can be integrated on it. The included file browser allows users to view the content of a specific directory on the server and add new content to that directory (create folders and upload files).</p>
-<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>&#36;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>//&#36;Config['UserFilesPath'] = '/UserFiles/';</code></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>";
+ $output .= t("<h3>How to enable the file browser</h3><p>The editor gives the end user the flexibility to create a custom file browser that can be integrated on it. The included file browser allows users to view the content of a specific directory on the server and add new content to that directory (create folders and upload files).</p><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>!config1</code><br/> and <br/><code>!config2</code> <br/> (FCKeditor 2.3.x - 2.4.x)<br/><br/> or <code>!config3</code> <br/> (FCKeditor 2.5+) </p><p>In this file you will need to enable the file browser:<br /><code>&#36;Config['Enabled'] = true;</code></p><p>To use the drupal files directory you also need to adjust the following variables in the connector configuration:<br/><code>&#36;Config['UserFilesPath']</code> and <code>&#36;Config['UserFilesAbsolutePath']</code>.<br/>Point <code>&#36;Config['UserFilesPath']</code> to the path to drupal &quot;files&quot; directory and set <code>&#36;Config['UserFilesAbsolutePath']</code> to the absolute path to the same directory.</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 ('!filesdir'). These directories must have the same privileges as the drupal files directory. In some cases these directories must be world writable (chmod 0777).</p>",
+ array('!config1' => base_path() . drupal_get_path('module', 'fckeditor') ."/fckeditor/editor/filemanager/browser/default/connectors/php/config.php",
+ '!config2' => base_path() . drupal_get_path('module', 'fckeditor') ."/fckeditor/editor/filemanager/upload/php/config.php",
+ '!config3' => base_path() . drupal_get_path('module', 'fckeditor') ."/fckeditor/editor/filemanager/connectors/php/config.php",
+ '!filesdir' => file_directory_path(),
+ )
+ );
+ $output .= t(<<<HEREDOC
+<h3>Making File Browser more secure</h3><p>Please be aware that enabling file browser simply by setting <code>&#36;Config['Enabled'] = true;</code> theoretically enables it for each user (with a little bit of hackery, it is possible to use file browser without appropiate Drupal permissions). The more secure way of enabling file browser is as follows:</p><ol><li>Instead of setting <br/> <code>&#36;Config['Enabled'] = true ;</code><br/> add the following code: <pre>!snippet</pre> straight after <code>&#36;Config['Enabled'] = false ;</code><br/>This code enables file browser only to users that have <a href="!url">!access1</a> permission.<br/>Note: if you don't set <code>&#36;drupal_path</code> correctly, FCKeditor will find it out by itself.</li><li>As of Drupal 5.2, additional step is required: <br/> locate file named <code>settings.php</code> inside your drupal directory (usually <code>sites/default/settings.php</code>) and set <code>&#36;cookie_domain</code> variable to the appropiate domain (remember to uncomment that line).</li></ol>
+HEREDOC
+,array(
+ '!url' => url('admin/user/permissions'),
+ '!snippet' => '
+$drupal_path = "../../../../../../../../..";
+if(!file_exists($drupal_path . "/includes/bootstrap.inc")) {
+ $drupal_path = "../..";
+ do {
+ $drupal_path .= "/..";
+ $depth = substr_count($drupal_path, "..");
+ false;
+ }
+ while(!($bootstrapFileFound = file_exists($drupal_path . "/includes/bootstrap.inc")) && $depth<10);
+}
+if (!isset($bootstrapFileFound) || $bootstrapFileFound) {
+ $cwd = getcwd();
+ chdir($drupal_path);
+ require_once "./includes/bootstrap.inc";
+ drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
+ $Config["Enabled"] = user_access("allow fckeditor file uploads");
+ chdir($cwd);
+}',
+ '!access1' => t('allow fckeditor file uploads'), )
+ );
+
break;
}
return $output;
@@ -66,135 +143,275 @@ function fckeditor_help($section = '') {
/**
* Implementation of hook_perm
+ * Administer -> User management -> Access Control
*/
function fckeditor_perm() {
- return array('use default fckeditor', 'use advanced fckeditor', 'allow fckeditor file uploads');
+ return array('administer fckeditor', 'access fckeditor', 'allow fckeditor file uploads');
}
/**
* Implementation of textarea
+ * Replace textarea with FCKeditor using callback function (fckeditor_process_textarea)
*/
function fckeditor_elements() {
$type = array();
- if (user_access('use advanced fckeditor') || user_access('use default fckeditor')) {
+ if (user_access('administer fckeditor')) {
+ $type['textfield'] = array(
+ '#process' => array(
+ 'fckeditor_process_input'
+ ),
+ );
+ }
+ if (user_access('access fckeditor')) {
// only roles with permission get the fckeditor
if (fckeditor_is_compatible_client()) {
// it would be useless to dig deeper if we're not able or allowed to
$type['textarea'] = array(
- '#process' => array(
- 'fckeditor_process_textarea' => array()
- ),
+ '#process' => array(
+ 'fckeditor_process_textarea'
+ ),
);
}
}
return $type;
}
-function fckeditor_menu($may_cache) {
- if ($may_cache) {
- $items[] = array(
- 'path' => 'admin/settings/fckeditor',
- 'title' => t('FCKeditor'),
- 'callback' => 'drupal_get_form',
- 'callback arguments' => array('fckeditor_settings_form'),
- 'access' => user_access('administer site configuration'),
- 'description' => t("Enables the usage of FCKeditor (WYSIWYG editor) instead of plain text fields."),
- );
+/**
+ * Allow more than 255 chars in Allowed HTML tags textfield
+ *
+ */
+function fckeditor_process_input($element) {
+ if ($element['#id']=='edit-allowed-html-1') {
+ $element['#maxlength'] = max($element['#maxlength'], 1024);
}
- return $items;
+ return $element;
}
-function fckeditor_settings_form() {
- // Settings form
- $toolbar_options = array(
- 'Default' => 'Default',
- 'DrupalFull' => 'Drupal Full',
- 'DrupalBasic' => 'Drupal Basic',
- 'Basic' => 'Basic',
- );
+/**
+ * Add link to FCKeditor configuration in "Administer -> Site configuration" section
+ *
+ */
+function fckeditor_menu() {
+
+ $items = array();
- // Generate the form - settings applying to all patterns first
- $form['fckeditor_settings'] = array(
- '#type' => 'fieldset',
- '#weight' => -20,
- '#title' => t('Basic settings'),
- '#collapsible' => TRUE,
- '#collapsed' => FALSE,
- );
- $form['fckeditor_settings']['fckeditor_popup'] = array(
- '#type' => 'checkbox',
- '#title' => t('Use FCKeditor in a popup window'),
- '#default_value' => variable_get('fckeditor_popup', '0'),
- '#description' => t('If this option is selected a link to a popup window will be used instead of a textarea replace.'),
- );
- $form['fckeditor_settings']['fckeditor_default_toolbar'] = array(
- '#type' => 'select',
- '#title' => t('Default Toolbar'),
- '#default_value' => variable_get('fckeditor_default_toolbar', 'DrupalBasic'),
- '#options' => $toolbar_options,
- '#description' => t('Choose a default toolbar set.'),
- );
- $form['fckeditor_settings']['fckeditor_advanced_toolbar'] = array(
- '#type' => 'select',
- '#title' => t('Advanced Toolbar'),
- '#default_value' => variable_get('fckeditor_advanced_toolbar', 'DrupalFull'),
- '#options' => $toolbar_options,
- '#description' => t('Choose a toolbar set for administrators.'),
- );
+ $items['admin/settings/fckeditor'] = array(
- $form['fckeditor_exclude_settings'] = array(
- '#type' => 'fieldset',
- '#weight' => -15,
- '#title' => t('Exclusion settings'),
- '#collapsible' => TRUE,
- '#collapsed' => TRUE,
- );
- $form['fckeditor_exclude_settings']['fckeditor_minimum_rows'] = array(
- '#type' => 'textfield',
- '#title' => t('Minimum rows'),
- '#default_value' => variable_get('fckeditor_minimum_rows', 5),
- '#description' => t("Textareas must have a minimum of rows before FCKeditor will be triggered. Enter '1' if you do not want to use this feature."),
+ 'title' => t('FCKeditor'),
+ 'description' => t('Configure the rich editor.'),
+ 'page callback' => 'fckeditor_admin',
+ 'access arguments' => array('administer fckeditor'),
+ 'type' => MENU_NORMAL_ITEM,
);
- /**
- * get excluded fields - so we can have normal textareas too
- * split the phrase by any number of commas or space characters,
- * which include " ", \r, \t, \n and \f
- */
- $form['fckeditor_exclude_settings']['fckeditor_exclude'] = array(
- '#type' => 'textarea',
- '#title' => t('Exclude fields'),
- '#cols' => 60,
- '#rows' => 5,
- '#default_value' => variable_get("fckeditor_exclude", ''),
- '#description' => t("Names (HTML ID's) of fields that may not have an FCKeditor (separated by commas, spaces or newlines. You may also use * for a wildcard)"),
- );
-
- $form['fckeditor_special_settings'] = array(
- '#type' => 'fieldset',
- '#weight' => -10,
- '#title' => t('Advanced settings'),
- '#collapsible' => TRUE,
- '#collapsed' => TRUE,
- );
- $form['fckeditor_special_settings']['fckeditor_toolbar_start_expanded'] = array(
- '#type' => 'checkbox',
- '#title' => t('Start the toolbar expanded'),
- '#default_value' => variable_get('fckeditor_toolbar_start_expanded', '1'),
- '#description' => t('The toolbar start expanded or collapsed.'),
- );
- $form['fckeditor_special_settings']['fckeditor_width'] = array(
- '#type' => 'textfield',
- '#title' => t('Width'),
- '#default_value' => variable_get("fckeditor_width", "100%"),
- '#description' => t("Width in pixels or percent. Ex: 400 or 100%"),
- );
-
- return system_settings_form($form);
+
+ return $items;
+}
+
+//Remove a profile from the database.
+function fckeditor_profile_delete($name) {
+ db_query("DELETE FROM {fckeditor_settings} WHERE name = '%s'", $name);
+ db_query("DELETE FROM {fckeditor_role} WHERE name = '%s'", $name);
+}
+
+/**
+ * Profile validation.
+ */
+function fckeditor_profile_validate($edit) {
+ $errors = array();
+ if (!$edit['name']) {
+ $errors['name'] = t('You must give a profile name.');
+ }
+
+ if (!$edit['rids']) {
+ $errors['rids'] = t('You must select at least one role.');
+ }
+
+ foreach ($errors as $name => $message) {
+ form_set_error($name, $message);
+ }
+
+ return count($errors) == 0;
}
/**
+ * Controller for FCKeditor administrative settings.
+ */
+function fckeditor_admin($arg = NULL) {
+
+ $module_drupal_path = drupal_get_path('module', 'fckeditor');
+ $fckconfig_file = $module_drupal_path . '/fckeditor/fckconfig.js';
+ if (!file_exists($fckconfig_file)) {
+ drupal_set_message(t('checking for %filename', array('%filename' => $fckconfig_file)));
+ drupal_set_message(
+ t('The FCKeditor component is not installed correctly. Please go to the !fckeditorlink to download the latest version. After that you must extract the files to %modulepath and make sure that the directory %modulesubdir and the file %modulefile exist. Refer to the !readme for more information.',
+ array(
+ '!fckeditorlink'=>l(t('FCKeditor homepage'), 'http://www.fckeditor.net'),
+ '!readme' => l('readme.txt', 'admin/help/fckeditor'),
+ '%modulepath' => base_path() . $module_drupal_path .'/fckeditor/',
+ '%modulesubdir' => base_path() . $module_drupal_path .'/fckeditor/editor',
+ '%modulefile' => base_path() . $module_drupal_path .'/fckeditor/fckeditor.js')),
+ 'error');
+ return false;
+ }
+
+ $edit = $_POST;
+ $op = $_POST['op'];
+
+ $op = $arg && !$op ? $arg : $op;
+
+ switch ($op) {
+ case 'add':
+ $breadcrumb[] = array('path' => 'admin', 'title' => t('administer'));
+ $breadcrumb[] = array('path' => 'admin/settings/fckeditor', 'title' => t('fckeditor'));
+ $breadcrumb[] = array('path' => 'admin/settings/fckeditor/add', 'title' => t('Add new FCKeditor profile'));
+ menu_set_location($breadcrumb);
+ $output = fckeditor_profile_form($edit);
+ break;
+
+ case 'edit':
+ drupal_set_title(t('Edit FCKeditor profile'));
+ $output = fckeditor_profile_form(fckeditor_profile_load(urldecode(arg(4))));
+ break;
+
+ case 'delete':
+ fckeditor_profile_delete(urldecode(arg(4)));
+ drupal_set_message(t('Deleted profile'));
+ drupal_goto('admin/settings/fckeditor');
+ break;
+
+ case t('Create profile');
+ case t('Update profile');
+ if (fckeditor_profile_validate($edit)) {
+ fckeditor_profile_save($edit);
+ $edit['old_name'] ? drupal_set_message(t('Your FCKeditor profile has been updated.')) : drupal_set_message(t('Your FCKeditor profile has been created.'));
+ drupal_goto('admin/settings/fckeditor');
+ }
+ else {
+ $output = fckeditor_profile_form($edit);
+ }
+ break;
+
+ default:
+ drupal_set_title(t('FCKeditor settings'));
+ //Check if FCKeditor is installed.
+ $fckeditor_loc = drupal_get_path('module', 'fckeditor') .'/fckeditor/';
+ if (!is_dir($fckeditor_loc)) {
+ drupal_set_message(t('Could not find the FCKeditor engine installed at <strong>!fckeditor-directory</strong>. Please <a href="http://www.fckeditor.net/download">download FCKeditor</a>, uncompress it and copy the folder into !fckeditor-path.', array('!fckeditor-path' => drupal_get_path('module', 'fckeditor'), '!fckeditor-directory' => $fckeditor_loc)), 'error');
+ }
+ $output = fckeditor_profile_overview();
+ }
+
+ return $output;
+}
+
+/**
+ * Save a profile to the database.
+ * @todo add more entries to array in the user_save line
+ */
+function fckeditor_profile_save($edit) {
+ db_query("DELETE FROM {fckeditor_settings} WHERE name = '%s' or name = '%s'", $edit['name'], $edit['old_name']);
+ db_query("DELETE FROM {fckeditor_role} WHERE name = '%s' or name = '%s'", $edit['name'], $edit['old_name']);
+ db_query("INSERT INTO {fckeditor_settings} (name, settings) VALUES ('%s', '%s')", $edit['name'], serialize($edit));
+ foreach ($edit['rids'] as $rid => $value) {
+ db_query("INSERT INTO {fckeditor_role} (name, rid) VALUES ('%s', %d)", $edit['name'], $rid);
+ }
+
+ // if users can't set their own defaults, make sure to remove $user->fckeditor_status so their default doesn't override the main default
+ if ($edit['user_choose'] == 'false') {
+ global $user;
+ user_save($user, array('fckeditor_status' => NULL));
+ }
+}
+
+/**
+ * Controller for fckeditor profiles.
+ */
+function fckeditor_profile_overview() {
+ $output = '';
+
+ $profiles = fckeditor_profile_load();
+ if ($profiles) {
+ $roles = user_roles();
+ $header = array(t('Profile'), t('Roles'), t('Operations'));
+ foreach ($profiles as $p) {
+ $rows[] = array(array('data' => $p->name, 'valign' => 'top'), array('data' => implode("<br />\n", $p->rids)), array('data' => l(t('edit'), 'admin/settings/fckeditor/edit/'. urlencode($p->name)) . ' '. l(t('delete'), 'admin/settings/fckeditor/delete/'. urlencode($p->name)), 'valign' => 'top'));
+ }
+ $output .= theme('table', $header, $rows);
+ $output .= t('<p><a href="!create-profile-url">Create new profile</a></p>', array('!create-profile-url' => url('admin/settings/fckeditor/add')));
+ }
+ else {
+ drupal_set_message(t('No profiles found. Click here to <a href="!create-profile-url">create a new profile</a>.', array('!create-profile-url' => url('admin/settings/fckeditor/add'))));
+ }
+
+ return $output;
+}
+
+/**
+ * Load all profiles. Just load one profile if $name is passed in.
+ */
+function fckeditor_profile_load($name = '') {
+ static $profiles = array();
+
+ if (!$profiles) {
+ $roles = user_roles();
+ $result = db_query('SELECT * FROM {fckeditor_settings}');
+ while ($data = db_fetch_object($result)) {
+ $data->settings = unserialize($data->settings);
+ $result2 = db_query("SELECT rid FROM {fckeditor_role} WHERE name = '%s'", $data->name);
+ $role = array();
+ while ($r = db_fetch_object($result2)) {
+ $role[$r->rid] = $roles[$r->rid];
+ }
+ $data->rids = $role;
+
+ $profiles[$data->name] = $data;
+ }
+ }
+
+ return ($name ? $profiles[$name] : $profiles);
+}
+
+function fckeditor_is_enabled($excl_mode, $excl_list, $element_id, $get_q) {
+ $exclude = preg_split("/[\s,]+/", strip_tags($excl_list));
+ $toggle = $excl_mode;
+
+ switch ($toggle) {
+ case (1):
+ // normal inclusion based on the id
+ $enabled = fckeditor_idsearch($element_id, $exclude);
+ break;
+ case (2):
+ // Path exclusion
+ $enabled = true; // defaults to enabled
+ // This bizarre bit of magic courtesy of block.module
+ $path = drupal_get_path_alias($get_q);
+ $regexp = '/^('. preg_replace(array('/(\r\n?|\n)/', '/\\\\\*/', '/(^|\|)\\\\<front\\\\>($|\|)/'), array('|', '.*', '\1'. preg_quote(variable_get('site_frontpage', 'node'), '/') .'\2'), preg_quote($excl_list, '/')) .')$/';
+ if(preg_match($regexp, $path)) {
+ $enabled = false; // but if in excluded paths disable it again
+ }
+ break;
+ case (3):
+ // Path inclusion
+ // This bizarre bit of magic courtesy of block.module
+ $path = drupal_get_path_alias($get_q);
+ $regexp = '/^('. preg_replace(array('/(\r\n?|\n)/', '/\\\\\*/', '/(^|\|)\\\\<front\\\\>($|\|)/'), array('|', '.*', '\1'. preg_quote(variable_get('site_frontpage', 'node'), '/') .'\2'), preg_quote($excl_list, '/')) .')$/';
+ if(preg_match($regexp, $path)) {
+ $enabled = true;
+ }
+ break;
+ case (0):
+ default:
+ // normal exclusion based on the id
+ $enabled = !fckeditor_idsearch($element_id, $exclude);
+ break;
+ }
+
+ return $enabled;
+}
+
+/**
* This function create the HTML objects required for the FCKeditor
*
* @param $element
@@ -203,55 +420,170 @@ function fckeditor_settings_form() {
* The same $element with extra FCKeditor markup and initialization
*/
function fckeditor_process_textarea($element) {
- $exclude = preg_split("/[\s,]+/", strip_tags(variable_get("fckeditor_exclude", '')));
+ static $is_running = FALSE;
+ static $num = 1;
+ global $user, $fckeditor_simple_toolbar_ids;
+ static $profile_name;
- if (($element['#rows'] > variable_get('fckeditor_minimum_rows', 5))
- && !fckeditor_idsearch($element['#id'], $exclude)) {
- // only replace textarea when it has enough rows and it is not in the exclusion list
+ //skip this one, surely nobody wants WYSIWYG here
+ switch ($element['#id']) {
+ case 'edit-excl-list':
+ case 'edit-simple-incl-list':
+ case 'edit-log':
+ return $element;
+ break;
+ }
+ if (isset($element['#attributes']['disabled']) && $element['#attributes']['disabled'] == 'disabled') {
+ return $element;
+ }
+ // Since fckeditor_profile_load() makes a db hit, only call it when we're pretty sure
+ // we're gonna render fckeditor.
+ if (!$profile_name) {
+ $profile_name = db_result(db_query('SELECT s.name FROM {fckeditor_settings} s INNER JOIN {fckeditor_role} r ON r.name = s.name WHERE r.rid IN (%s)', implode(',', array_keys($user->roles))));
+ if (!$profile_name) {
+ return $element;
+ }
+ }
+
+ $profile = fckeditor_profile_load($profile_name);
+ $conf = array();
+ $conf = $profile->settings;
+
+ if ($conf['allow_user_conf']) {
+ foreach (array('default','show_toggle','popup','skin','toolbar','expand','width','lang','auto_lang') as $setting) {
+ $conf[$setting] = fckeditor_user_get_setting($user, $profile, $setting);
+ }
+ }
+ if ($conf["popup"]=="t" && $conf["show_toggle"]=="t") {
+ $conf["show_toggle"]="f";
+ }
+
+ $themepath = path_to_theme() . '/';
+ $host = base_path();
+
+ // Set resizable to false to avoid drupal.js resizable function from taking control of the textarea
+ $element['#resizable'] = FALSE;
+
+ $enabled = fckeditor_is_enabled($conf['excl_mode'], $conf['excl_list'], $element['#id'], $_GET['q']);
+
+ if (($element['#rows'] > $conf['min_rows']) && $enabled) {
+
+ // only replace textarea when it has enough rows and it is enabled
+ $js_id = 'oFCK_' . $num++;
+ $fckeditorOn = ($conf['default']=='t') ? 1 : 0 ;
+
+ $wysiwyg_link = "<div id=\"fck_{$js_id}\"><textarea id=\"{$js_id}\">". htmlspecialchars($element['#value']). "</textarea></div>\n";
+ $wysiwyg_link .= "<a href=\"javascript:Toggle('{$js_id}','{$element['#id']}','".t("Switch to plain text editor")."','".t("Switch to rich text editor")."');\" id=\"switch_{$js_id}\" ".($fckeditorOn?"style=\"display:none\"":"").">";
+ $wysiwyg_link .= $fckeditorOn ? t("Switch to plain text editor") : t("Switch to rich text editor");
+ $wysiwyg_link .= "</a>";
+ $wysiwyg_link .= "\n<script type=\"text/javascript\">";
+ $wysiwyg_link .= "window.setTimeout(\"CreateToggle('{$element['#id']}','{$js_id}', $fckeditorOn);\",100);\n</script>";
+
+ //settings are saved as strings, not booleans
+ if ($profile->settings['show_toggle'] == 't') {
+ // Make sure to append to #suffix so it isn't completely overwritten
+ $element['#suffix'] .= $wysiwyg_link;
+ }
// 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']);
+ $files_path = base_path() . file_directory_path();
+ // module_drupal_path:
+ // 'modules/fckeditor' (length=17)
+ // module_full_path:
+ // '/drupal5/modules/fckeditor' (length=26)
+ // files_path:
+ // '/drupal5/files' (length=14)
// configured in settings
- $width = variable_get("fckeditor_width", '100%');
+ $width = $conf['width'];
// sensible default for small toolbars
- $height = $element['#rows'] * 14 + 100;
+ $height = $element['#rows'] * 14 + 140;
// nessecary because FCKeditor interferes with resize script
$element['#resizable'] = FALSE;
- drupal_add_js($module_drupal_path . '/fckeditor/fckeditor.js');
-
- if (user_access('use advanced fckeditor')) {
- $toolbar = variable_get("fckeditor_advanced_toolbar", 'DrupalFull');
- $height += 100; // sensible default for admin toolbars toolbars
+ if (!$is_running) {
+ drupal_add_js($module_drupal_path . '/fckeditor/fckeditor.js');
+ drupal_add_js($module_drupal_path . '/fckeditor.utils.js');
+ $is_running = true;
}
- else {
- $toolbar = variable_get("fckeditor_default_toolbar", 'DrupalBasic');
+
+ $toolbar = $conf['toolbar'];
+ //$height += 100; // for larger toolbars
+
+ $forceSimpleToolbar = fckeditor_is_enabled($conf['simple_incl_mode'], $conf['simple_incl_list'], $element['#id'], $_GET['q']);
+ if ($forceSimpleToolbar) {
+ $toolbar = FCKEDITOR_FORCE_SIMPLE_TOOLBAR_NAME;
}
- $element['#suffix'] .= "\n<script type=\"text/javascript\">
-var ".$js_id." = new FCKeditor( '".$element['#id']."' );
+ $textareaID = $profile->settings['show_toggle'] == 't' ? $js_id : $element['#id'];
+
+ $element['#suffix'] .= "\n<script type=\"text/javascript\">
+var ".$js_id." = new FCKeditor( '".$textareaID."' );
".$js_id.".BasePath = '".$module_full_path."/fckeditor/';
".$js_id.".Config['CustomConfigurationsPath'] = '".$module_full_path."/fckeditor.config.js';
-".$js_id.".ToolbarSet = '".$toolbar."';
-".$js_id.".Height = '".$height."';\n";
+".$js_id.".Config['TextareaID'] = '".$element['#id']."';";
+
+ //if ($conf['appearance_conf'] == 'f') {
+ $element['#suffix'] .= "\n".$js_id.".ToolbarSet = '".$toolbar."';
+".$js_id.".Config['SkinPath'] = ".$js_id.".BasePath + 'editor/skins/".$conf['skin']."/';
+".$js_id.".Config['DefaultLanguage'] = '".$conf['lang']."';
+".$js_id.".Config['AutoDetectLanguage'] = '".($conf['auto_lang']=="t"?"true":"false")."';
+".$js_id.".Height = '".$height."';
+".$js_id.".Config['ToolbarStartExpanded'] = '".($conf['expand']=="t"?"true":"false")."';
+".$js_id.".Width = '".$width."';\n";
+ //}
+ //if ($conf['output_conf'] == 'f') {
+ $element['#suffix'] .= "\n".$js_id.".Config['EnterMode'] = '".$conf['enter_mode']."';
+".$js_id.".Config['ShiftEnterMode'] = '".$conf['shift_enter_mode']."';
+".$js_id.".Config['FontFormats'] = '".str_replace(",",";",$conf['font_format'])."';
+".$js_id.".Config['FormatSource'] = '".($conf['format_source']=="t"?"true":"false")."';
+".$js_id.".Config['FormatOutput'] = '".($conf['format_output']=="t"?"true":"false")."';\n";
+ //}
+ // integrate IMCE if it exists and is prefered
+ if (function_exists('imce_integrate') && variable_get('imce_settings_fck', 0)) {
+ imce_integrate('fck');
+ $advanced_uploads = 0;
+ $basic_uploads = 0;
+ }
+ else {
+ $advanced_uploads = ($conf['upload_advanced']=="t");
+ $basic_uploads = ($conf['upload_basic']=="t");
+ }
// 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=/".$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;
+ if (user_access('allow fckeditor file uploads')==1) {
+ $connector_path = $module_drupal_path . "/fckeditor/editor/filemanager/connectors/php/connector.php" ;
+ $connector_path = file_exists($connector_path) ? "../../connectors/php/connector.php" : "connectors/php/connector.php" ;
+ $upload_path = $module_drupal_path . "/fckeditor/editor/filemanager/connectors/php/upload.php" ;
+ $upload_path = file_exists($upload_path) ? "/fckeditor/editor/filemanager/connectors/php/upload.php" : "/fckeditor/editor/filemanager/upload/php/upload.php" ;
+ if ($advanced_uploads) {
+ $element['#suffix'] .= $js_id.".Config['LinkBrowserURL'] = '".$module_full_path."/fckeditor/editor/filemanager/browser/default/browser.html?Connector=".$connector_path."&ServerPath=".$files_path."';
+ ".$js_id.".Config['ImageBrowserURL'] = '".$module_full_path."/fckeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector=".$connector_path."&ServerPath=".$files_path."';
+ ".$js_id.".Config['FlashBrowserURL'] = '".$module_full_path."/fckeditor/editor/filemanager/browser/default/browser.html?Type=Flash&Connector=".$connector_path."&ServerPath=".$files_path."';\n";
+ }
+ else {
+ $element['#suffix'] .= $js_id.".Config['LinkBrowser'] = false;
+".$js_id.".Config['ImageBrowser'] = false;
+".$js_id.".Config['FlashBrowser'] = false;\n";
+ }
+ if ($basic_uploads) {
+ $element['#suffix'] .= $js_id.".Config['LinkUploadURL'] = '".$module_full_path . $upload_path."';
+ ".$js_id.".Config['ImageUploadURL'] = '".$module_full_path . $upload_path."?Type=Image';
+ ".$js_id.".Config['FlashUploadURL'] = '".$module_full_path . $upload_path."?Type=Flash';\n";
+ }
+ else {
+ $element['#suffix'] .= $js_id.".Config['LinkUpload'] = false;
".$js_id.".Config['ImageUpload'] = false;
".$js_id.".Config['FlashUpload'] = false;\n";
- } else {
+ }
+ }
+ else {
+ $_SESSION['FCKeditor']['upload_allowed'] = false;
$element['#suffix'] .= $js_id.".Config['LinkBrowser'] = false;
".$js_id.".Config['ImageBrowser'] = false;
".$js_id.".Config['FlashBrowser'] = false;
@@ -260,25 +592,699 @@ var ".$js_id." = new FCKeditor( '".$element['#id']."' );
".$js_id.".Config['FlashUpload'] = false;\n";
}
+ // add custom xml stylesheet if it exists
+ if (file_exists($themepath.'/fckstyles.xml')) {
+ $styles_xml_path = $host.$themepath.'/fckstyles.xml';
+ $element['#suffix'] .= $js_id.".Config['StylesXmlPath'] = '".$styles_xml_path."';\n";
+ }
+
+ // add custom stylesheet if configured
+ // lets hope it exists but we'll leave that to the site admin
+ if ($conf['css_mode'] == 'theme') {
+ $css = $themepath . 'style.css';
+ if (file_exists($css)) {
+ $element['#suffix'] .= $js_id.".Config['EditorAreaCSS'] = '".$host . $css.",".$module_full_path."/fckeditor.css';";
+ }
+ }
+ else if ($conf['css_mode'] == 'self') {
+ $element['#suffix'] .= $js_id.".Config['EditorAreaCSS'] = '".str_replace(array('%h', '%t'), array($host, $themepath), $conf['css_path']).",".$module_full_path."/fckeditor.css';";
+ }
+
$element['#suffix'] .= "</script>\n";
- if (variable_get('fckeditor_popup', '0')) {
- // Add the script file with the popup open function.
+ if ($conf['popup']=="t") {
+ // Add the script file with the popup open function.
drupal_add_js($module_drupal_path . '/fckeditor.popup.js');
- $element['#title'] .= " <span class=\"fckeditor_popuplink\">(<a href=\"#\" onclick=\"FCKeditor_OpenPopup('".$module_full_path."/fckeditor.popup.html?var=".$js_id."&el=".$element['#id']."');return false;\">" . t('Open rich editor') . "</a>)</span>";
- }
+ $element['#suffix'] .= " <span class=\"fckeditor_popuplink\">(<a href=\"#\" onclick=\"FCKeditor_OpenPopup('".$module_full_path."/fckeditor.popup.html?var=".$js_id."&el=".$element['#id']."');return false;\">" . t('Open rich editor') . "</a>)</span>";
+ }
else {
- // if no popup mode, add the editor
- $element['#suffix'] .="<script type=\"text/javascript\">
- ".$js_id.".ReplaceTextarea();
-</script>\n";
+ // if no popup mode, add the editor initialization to the footer
+ // this obviously needs print($closure) in page.tpl.php
+ if ($fckeditorOn) {
+ drupal_add_js('if (Drupal.jsEnabled) {$(document).ready(function() {'.$js_id.'.ReplaceTextarea();});}', 'inline', 'footer');
+ }
}
}
+ // display the field id for administrators
+ if (user_access('administer fckeditor')) {
+ $element['#suffix'] .= '<div class="textarea-identifier description">The ID for for <a href="'. url('admin/settings/fckeditor') .'">excluding or including</a> this element is: '.$element['#id'].' - the path is: '.$_GET['q'].'</div>';
+ }
+
return $element;
}
/**
+ * Implementation of hook_user().
+ */
+function fckeditor_user($type, &$edit, &$user, $category = NULL) {
+ if ($type == 'form' && $category == 'account' && user_access('access fckeditor')) {
+ $profile = fckeditor_user_get_profile($user);
+ $toolbar_options = fckeditor_load_toolbar_options();
+ $skin_options = fckeditor_load_skin_options();
+ $lang_options = fckeditor_load_lang_options();
+
+ // because the settings are saved as strings we need to test for the string 'true'
+ if ($profile->settings['allow_user_conf'] == 't') {
+ $form['fckeditor'] = array(
+ '#type' => 'fieldset',
+ '#title' => t('Rich Text Editor settings'),
+ '#weight' => 10,
+ '#collapsible' => TRUE,
+ '#collapsed' => TRUE
+ );
+
+ $form['fckeditor']['fckeditor_default'] = array(
+ '#type' => 'select',
+ '#title' => t('Default state'),
+ '#default_value' => isset($user->fckeditor_default) ? $user->fckeditor_default : (isset($profile->settings['default']) ? $profile->settings['default'] : 'f'),
+ '#options' => array('t' => t('enabled'),'f' => t('disabled')),
+ '#description' => t('Should rich-text editing be enabled or disabled by default in textarea fields? If disabled, rich text editor may still be enabled using toggle or popup window.'),
+ );
+
+ $form['fckeditor']['fckeditor_show_toggle'] = array(
+ '#type' => 'select',
+ '#title' => t('Show disable/enable rich text editor toggle'),
+ '#default_value' => isset($user->fckeditor_show_toggle) ? $user->fckeditor_show_toggle : (isset($profile->settings['show_toggle']) ? $profile->settings['show_toggle'] : 't'),
+ '#options' => array('t' => t('true'), 'f' => t('false')),
+ '#description' => t('Whether or not to show the disable/enable rich text editor toggle below the textarea. Works only if FCKeditor is not running a popup window (see below).'),
+ );
+
+ $form['fckeditor']['fckeditor_popup'] = array(
+ '#type' => 'select',
+ '#title' => t('Use FCKeditor in a popup window'),
+ '#default_value' => isset($user->fckeditor_popup) ? $user->fckeditor_popup : (isset($profile->settings['popup']) ? $profile->settings['popup'] : 'f'),
+ '#options' => array('f' => t('false'), 't' => t('true')),
+ '#description' => t('If this option is enabled a link to a popup window will be used instead of a textarea replace.'),
+ );
+
+ $form['fckeditor']['fckeditor_skin'] = array(
+ '#type' => 'select',
+ '#title' => t('Skin'),
+ '#default_value' => isset($user->fckeditor_skin) ? $user->fckeditor_skin : (isset($profile->settings['skin']) ? $profile->settings['skin'] : 'default'),
+ '#options' => $skin_options,
+ '#description' => t('Choose a FCKeditor skin.'),
+ );
+
+ $form['fckeditor']['fckeditor_toolbar'] = array(
+ '#type' => 'select',
+ '#title' => t('Toolbar'),
+ '#default_value' => isset($user->fckeditor_toolbar) ? $user->fckeditor_toolbar : (isset($profile->settings['toolbar']) ? $profile->settings['toolbar'] : 'default'),
+ '#options' => $toolbar_options,
+ '#description' => t('Choose a FCKeditor toolbar set.'),
+ );
+
+ $form['fckeditor']['fckeditor_expand'] = array(
+ '#type' => 'select',
+ '#title' => t('Start the toolbar expanded'),
+ '#default_value' => isset($user->fckeditor_expand) ? $user->fckeditor_expand : (isset($profile->settings['expand']) ? $profile->settings['expand'] : 't'),
+ '#options' => array('t' => t('enabled'), 'f' => t('disabled')),
+ '#description' => t('The toolbar start expanded or collapsed.'),
+ );
+
+ $form['fckeditor']['fckeditor_width'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Width'),
+ '#default_value' => isset($user->fckeditor_width) ? $user->fckeditor_width : (isset($profile->settings['width']) ? $profile->settings['width'] : '100%'),
+ '#description' => t("Width in pixels or percent. Ex: 400 or 100%"),
+ '#size' => 40,
+ '#maxlength' => 128,
+ );
+
+ $form['fckeditor']['fckeditor_lang'] = array(
+ '#type' => 'select',
+ '#title' => t('Language'),
+ '#default_value' => isset($user->fckeditor_lang) ? $user->fckeditor_lang : (isset($profile->settings['lang']) ? $profile->settings['lang'] : 'en'),
+ '#options' => $lang_options,
+ '#description' => t('The language for the FCKeditor interface.')
+ );
+
+ $form['fckeditor']['fckeditor_auto_lang'] = array(
+ '#type' => 'select',
+ '#title' => t('Auto-detect language'),
+ '#default_value' => isset($user->fckeditor_auto_lang) ? $user->fckeditor_auto_lang : (isset($profile->settings['auto_lang']) ? $profile->settings['auto_lang'] : 't'),
+ '#options' => array('t' => t('true'), 'f' => t('false')),
+ '#description' => t('Use auto detect user language feature.')
+ );
+
+ return array('fckeditor' => $form);
+ }
+ }
+
+ if ($type == 'validate') {
+ return array(
+ 'fckeditor_default' => $edit['fckeditor_default'],
+ 'fckeditor_show_toggle' => $edit['fckeditor_show_toggle'],
+ 'fckeditor_popup' => $edit['fckeditor_popup'],
+ 'fckeditor_skin' => $edit['fckeditor_skin'],
+ 'fckeditor_toolbar' => $edit['fckeditor_toolbar'],
+ 'fckeditor_expand' => $edit['fckeditor_expand'],
+ 'fckeditor_width' => $edit['fckeditor_width'],
+ 'fckeditor_lang' => $edit['fckeditor_lang'],
+ 'fckeditor_auto_lang' => $edit['fckeditor_auto_lang'],
+ );
+ }
+}
+
+/**
+ * Return an HTML form for profile configuration.
+ */
+function fckeditor_profile_form($edit) {
+
+ $output .= drupal_get_form('fckeditor_profile_form_build', $edit);
+
+ return $output;
+}
+
+function fckeditor_load_toolbar_options() {
+ $arr = array();
+ $module_drupal_path = drupal_get_path('module', 'fckeditor');
+ $fckconfig_js = $module_drupal_path . '/fckeditor/fckconfig.js';
+ $fckeditor_config_js = $module_drupal_path . '/fckeditor.config.js';
+ if (file_exists($fckconfig_js) && is_readable($fckconfig_js)) {
+ $fp = @fopen($fckconfig_js, "r");
+ if ($fp) {
+ while (!feof($fp)) {
+ $line = fgets($fp,1024);
+ if (preg_match("/FCKConfig\.ToolbarSets\[(\"|')(.*?)\\1\]/i", $line, $matches)) {
+ $arr[$matches[2]] = ucfirst($matches[2]);
+ }
+ }
+ fclose($fp);
+ }
+ }
+ if (file_exists($fckeditor_config_js) && is_readable($fckeditor_config_js)) {
+ $fp = @fopen($fckeditor_config_js, "r");
+ if ($fp) {
+ while (!feof($fp)) {
+ $line = fgets($fp,1024);
+ if (preg_match("/FCKConfig\.ToolbarSets\[(\"|')(.*?)\\1\]/i", $line, $matches)) {
+ $arr[$matches[2]] = ucfirst($matches[2]);
+ }
+ }
+ fclose($fp);
+ }
+ }
+
+ //oops, we have no information about toolbars, let's use hardcoded array
+ if (empty($arr)) {
+ $arr = array(
+ 'Basic' => 'Basic',
+ 'Default' => 'Default',
+ );
+ }
+ asort($arr);
+
+ return $arr;
+}
+
+function fckeditor_load_skin_options() {
+ $arr = array();
+ $module_drupal_path = drupal_get_path('module', 'fckeditor');
+ $skin_dir = $module_drupal_path . '/fckeditor/editor/skins';
+ if (is_dir($skin_dir)) {
+ $dh = @opendir($skin_dir);
+ if( false !== $dh ) {
+ while(($file = readdir($dh)) !== false ) {
+ if(in_array($file, array(".","..","CVS",".svn"))){
+ continue;
+ }
+ if(is_dir($skin_dir.DIRECTORY_SEPARATOR.$file)) {
+ $arr[$file] = ucfirst($file);
+ }
+ }
+ closedir( $dh );
+ }
+ }
+
+ //oops, we have no information about skins, let's use only default
+ if (empty($arr)) {
+ $arr = array(
+ 'default' => 'Default',
+ );
+ }
+ asort($arr);
+
+ return $arr;
+}
+
+function fckeditor_load_lang_options() {
+ $arr = array();
+ $module_drupal_path = drupal_get_path('module', 'fckeditor');
+ $lang_dir = $module_drupal_path . '/fckeditor/editor/lang';
+ if (is_dir($lang_dir)) {
+ $dh = @opendir($lang_dir);
+ if( false !== $dh ) {
+ while(($file = readdir($dh)) !== false) {
+ if(in_array($file, array(".","..","CVS",".svn"))){
+ continue;
+ }
+ if(is_file($lang_dir.DIRECTORY_SEPARATOR.$file) && preg_match("/^(.*?)\.js$/",$file,$matches)) {
+ $lang = $matches[1];
+ $arr[$lang] = strtoupper($lang);
+ }
+ }
+ closedir( $dh );
+ }
+ }
+
+ //oops, we have no information about languages, let's use those available in FCKeditor 2.4.3
+ if (empty($arr)) {
+ $arr = array(
+ 'af' => 'Afrikaans',
+ 'ar' => 'Arabic',
+ 'bg' => 'Bulgarian',
+ 'bn' => 'Bengali/Bangla',
+ 'bs' => 'Bosnian',
+ 'ca' => 'Catalan',
+ 'cs' => 'Czech',
+ 'da' => 'Danish',
+ 'de' => 'German',
+ 'el' => 'Greek',
+ 'en' => 'English',
+ 'en-au' => 'English (Australia)',
+ 'en-ca' => 'English (Canadian)',
+ 'en-uk' => 'English (United Kingdom)',
+ 'eo' => 'Esperanto',
+ 'es' => 'Spanish',
+ 'et' => 'Estonian',
+ 'eu' => 'Basque',
+ 'fa' => 'Persian',
+ 'fi' => 'Finnish',
+ 'fo' => 'Faroese',
+ 'fr' => 'French',
+ 'gl' => 'Galician',
+ 'he' => 'Hebrew',
+ 'hi' => 'Hindi',
+ 'hr' => 'Croatian',
+ 'hu' => 'Hungarian',
+ 'it' => 'Italian',
+ 'ja' => 'Japanese',
+ 'km' => 'Khmer',
+ 'ko' => 'Korean',
+ 'lt' => 'Lithuanian',
+ 'lv' => 'Latvian',
+ 'mn' => 'Mongolian',
+ 'ms' => 'Malay',
+ 'nb' => 'Norwegian Bokmal',
+ 'nl' => 'Dutch',
+ 'no' => 'Norwegian',
+ 'pl' => 'Polish',
+ 'pt' => 'Portuguese (Portugal)',
+ 'pt-br' => 'Portuguese (Brazil)',
+ 'ro' => 'Romanian',
+ 'ru' => 'Russian',
+ 'sk' => 'Slovak',
+ 'sl' => 'Slovenian',
+ 'sr' => 'Serbian (Cyrillic)',
+ 'sr-latn' => 'Serbian (Latin)',
+ 'sv' => 'Swedish',
+ 'th' => 'Thai',
+ 'tr' => 'Turkish',
+ 'uk' => 'Ukrainian',
+ 'vi' => 'Vietnamese',
+ 'zh' => 'Chinese Traditional',
+ 'zh-cn' => 'Chinese Simplified',
+ );
+ }
+
+ asort($arr);
+
+ return $arr;
+}
+
+/**
+ * Return an HTML form for profile configuration.
+ */
+function fckeditor_profile_form_build($sth, $edit) {
+ $edit = (object) $edit;
+
+ $toolbar_options = fckeditor_load_toolbar_options();
+ $skin_options = fckeditor_load_skin_options();
+ $lang_options = fckeditor_load_lang_options();
+
+ // Only display the roles that currently don't have a fckeditor profile. One
+ // profile per role.
+ $orig_roles = user_roles(FALSE, 'access fckeditor');
+ $roles = $orig_roles;
+ if (arg(3) == 'add') {
+ $result = db_query('SELECT DISTINCT(rid) FROM {fckeditor_role}');
+ while ($data = db_fetch_object($result)) {
+ if (!in_array($data->rid, array_keys((array) $edit->rids)) && !form_get_errors()){
+ unset($roles[$data->rid]);
+ }
+ }
+ if (!$orig_roles) {
+ drupal_set_message(t('You must <a href="!access-control-url">assign</a> at least one role with the \'access fckeditor\' permission before creating a profile.', array('!access-control-url' => url('admin/user/permissions'),'!access1'=>t('access fckeditor'))), 'error');
+ }
+ else if (!$roles) {
+ drupal_set_message(t('You will not be allowed to create a new profile since all user roles have already been assigned profiles. Either remove an existing fckeditor profile from at least one role or assign another role the \'access fckeditor\' permission.'), 'error');
+ }
+ else if (count($orig_roles) != count($roles)) {
+ drupal_set_message(t('Not all user roles are shown since they already have fckeditor profiles. You must first unassign profiles in order to add them to a new one.'));
+ }
+ $btn = t('Create profile');
+ }
+ else {
+ $form['old_name'] = array('#type' => 'hidden', '#value' => $edit->name);
+ $btn = t('Update profile');
+ }
+
+ $form['basic'] = array(
+ '#type' => 'fieldset',
+ '#title' => t('Basic setup'),
+ '#collapsible' => TRUE,
+ '#collapsed' => TRUE
+ );
+
+ $form['basic']['name'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Profile name'),
+ '#default_value' => $edit->name,
+ '#size' => 40,
+ '#maxlength' => 128,
+ '#description' => t('Enter a name for this profile. This name is only visible within the fckeditor administration page.'),
+ '#required' => TRUE
+ );
+
+ $form['basic']['rids'] = array(
+ '#type' => 'checkboxes',
+ '#title' => t('Roles allowed to use this profile'),
+ '#default_value' => array_keys((array) $edit->rids),
+ '#options' => $roles,
+ '#description' => t('Check at least one role. Only roles with \'!access1\' permission will be shown here.', array('!access1' => t('access fckeditor'))),
+ '#required' => TRUE
+ );
+
+ $form['basic']['allow_user_conf'] = array(
+ '#type' => 'select',
+ '#title' => t('Allow users to customize FCKeditor appearance'),
+ '#default_value' => $edit->settings['allow_user_conf'] ? $edit->settings['allow_user_conf'] : 'f',
+ '#options' => array('f' => t('false'), 't' => t('true')),
+ '#description' => t('If allowed, users will be able to override <code>Editor appearance</code> by visiting their profile page.'),
+ );
+
+ $form['fckeditor_exclude_settings'] = array(
+ '#type' => 'fieldset',
+ '#title' => t('Visibility settings'),
+ '#collapsible' => TRUE,
+ '#collapsed' => TRUE,
+ );
+
+ $form['fckeditor_exclude_settings']['min_rows'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Minimum rows'),
+ '#default_value' => $edit->settings['min_rows'] ? $edit->settings['min_rows'] : '5',
+ '#description' => t("FCKeditor will be triggered if the textarea has more rows than entered here. Enter '1' if you do not want to use this feature."),
+ );
+
+ $form['fckeditor_exclude_settings']['excl_mode'] = array(
+ '#type' => 'radios',
+ '#title' => t('Use inclusion or exclusion mode'),
+ '#default_value' => $edit->settings['excl_mode'] ? $edit->settings['excl_mode'] : '0',
+ '#options' => array(
+ '0' => t('Exclude fields, will disable the editor on all selected fields'),
+ '1' => t('Include fields, will only load the editor for the selected fields'),
+ '2' => t('Exclude paths, will disable the editor for all textareas at the configured paths'),
+ '3' => t('Include paths, will load the editor for all large enough textareas at the configured paths.')),
+ '#description' => t('Choose what to do with the following values.'),
+ );
+
+ /**
+ * get excluded fields - so we can have normal textareas too
+ * split the phrase by any number of commas or space characters,
+ * which include " ", \r, \t, \n and \f
+ */
+ $form['fckeditor_exclude_settings']['excl_list'] = array(
+ '#type' => 'textarea',
+ '#title' => t('Selected fields or paths'),
+ '#cols' => 60,
+ '#rows' => 5,
+ '#default_value' => $edit->settings['excl_list'] ? $edit->settings['excl_list'] : '',
+ '#description' => t("Enter fieldnames or drupal paths here, depending on the chosen option for the inclusion mode.<br />Names (HTML ID's) of fields that may or may not have an FCKeditor.<br />Paths may be used the same way as in the drupal blocks configuration.<br />You may separate the different entries by commas, spaces or newlines. You may also use * as a wildcard character (for example <code>comment/*</code>).<br />You can not mix paths and ID's."),
+);
+
+ $form['fckeditor_exclude_settings']['simple_incl_mode'] = array(
+ '#type' => 'radios',
+ '#title' => t('Force simplified toolbar - choose inclusion mode'),
+ '#default_value' => $edit->settings['simple_incl_mode'] ? $edit->settings['simple_incl_mode'] : '1',
+ '#options' => array(
+ '1' => t('Include fields, will only load the simplified toolbar for the selected fields'),
+ '3' => t('Include paths, will load the simplified toolbar at the configured paths.')),
+ '#description' => t('Choose what to do with the following values.<br/>FCKeditor will force the <code>!simple</code> toolbar on the selected fields.<br/>Useful for smaller textareas where we usually don\'t use very complicated HTML code, like in signatures.',array('!simple' => FCKEDITOR_FORCE_SIMPLE_TOOLBAR_NAME)),
+ );
+
+ /**
+ * get excluded fields - so we can have normal textareas too
+ * split the phrase by any number of commas or space characters,
+ * which include " ", \r, \t, \n and \f
+ */
+ $form['fckeditor_exclude_settings']['simple_incl_list'] = array(
+ '#type' => 'textarea',
+ '#title' => t('Selected fields or paths where simplified toolbar should appear'),
+ '#cols' => 60,
+ '#rows' => 5,
+ '#default_value' => $edit->settings['simple_incl_list'] ? $edit->settings['simple_incl_list'] : '',
+ '#description' => t("If you don't want to use this feature, simply leave this field empty.<br />Enter fieldnames or drupal paths here, depending on the chosen option.<br />Names (HTML ID's) of fields that should have a simplified toolbar.<br />Paths may be used the same way as in the drupal blocks configuration.<br />You may separate the different entries by commas, spaces or newlines. You may also use * as a wildcard character (for example <code>comment/*</code>).<br />You can not mix paths and ID's."),
+);
+
+ $form['appearance'] = array(
+ '#type' => 'fieldset',
+ '#title' => t('Editor appearance'),
+ '#collapsible' => TRUE,
+ '#collapsed' => TRUE,
+ );
+
+ $form['appearance']['default'] = array(
+ '#type' => 'select',
+ '#title' => t('Default state'),
+ '#default_value' => $edit->settings['default'] ? $edit->settings['default'] : 't',
+ '#options' => array('t' => t('enabled'),'f' => t('disabled')),
+ '#description' => t('Default editor state. If disabled, rich text editor may still be enabled using toggle or popup window.'),
+ );
+
+ $form['appearance']['show_toggle'] = array(
+ '#type' => 'select',
+ '#title' => t('Show disable/enable rich text editor toggle'),
+ '#default_value' => $edit->settings['show_toggle'] ? $edit->settings['show_toggle'] : 't',
+ '#options' => array('t' => t('true'), 'f' => t('false')),
+ '#description' => t('Whether or not to show the disable/enable rich text editor toggle below the textarea. Works only if FCKeditor is not running in a popup window (see below).'),
+ );
+
+ $form['appearance']['popup'] = array(
+ '#type' => 'select',
+ '#title' => t('Use FCKeditor in a popup window'),
+ '#default_value' => $edit->settings['popup'] ? $edit->settings['popup'] : 'f',
+ '#options' => array('f' => t('false'), 't' => t('true')),
+ '#description' => t('If this option is enabled a link to a popup window will be used instead of a textarea replace.'),
+ );
+
+ $form['appearance']['skin'] = array(
+ '#type' => 'select',
+ '#title' => t('Skin'),
+ '#default_value' => $edit->settings['skin'] ? $edit->settings['skin'] : 'default',
+ '#options' => $skin_options,
+ '#description' => t('Choose a default skin.'),
+ );
+
+ $form['appearance']['toolbar'] = array(
+ '#type' => 'select',
+ '#title' => t('Toolbar'),
+ '#default_value' => $edit->settings['toolbar'] ? $edit->settings['toolbar'] : 'default',
+ '#options' => $toolbar_options,
+ '#description' => t('Choose a default toolbar set. To define new toolbar, edit <code>fckeditor.config.js</code> located in !module_path.', array('!module_path' => drupal_get_path('module', 'fckeditor'))),
+ );
+
+ $form['appearance']['expand'] = array(
+ '#type' => 'select',
+ '#title' => t('Start the toolbar expanded'),
+ '#default_value' => $edit->settings['expand'] ? $edit->settings['expand'] : 't',
+ '#options' => array('t' => t('enabled'), 'f' => t('disabled')),
+ '#description' => t('The toolbar start expanded or collapsed.'),
+ );
+
+ $form['appearance']['width'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Width'),
+ '#default_value' => $edit->settings['width'] ? $edit->settings['width'] : '100%',
+ '#description' => t("Width in pixels or percent. Ex: 400 or 100%"),
+ '#size' => 40,
+ '#maxlength' => 128,
+ );
+
+ $form['appearance']['lang'] = array(
+ '#type' => 'select',
+ '#title' => t('Language'),
+ '#default_value' => $edit->settings['lang'] ? $edit->settings['lang'] : 'en',
+ '#options' => $lang_options,
+ '#description' => t('The language for the FCKeditor interface.')
+ );
+
+ $form['appearance']['auto_lang'] = array(
+ '#type' => 'select',
+ '#title' => t('Auto-detect language'),
+ '#default_value' => $edit->settings['auto_lang'] ? $edit->settings['auto_lang'] : 't',
+ '#options' => array('t' => t('true'), 'f' => t('false')),
+ '#description' => t('Use auto detect user language feature.')
+ );
+
+/*
+$form['appearance']['appearance_conf'] = array(
+'#type' => 'select',
+'#title' => t('Ignore this section, use default settings defined in config files'),
+'#default_value' => $edit->settings['appearance_conf'] ? $edit->settings['appearance_conf'] : 'f',
+'#options' => array('f' => t('false'), 't' => t('true')),
+'#description' => t('Although it is less handy, defining settings only in config files (<code>fckconfig.js</code> and <code>fckeditor.config.js</code>) will slightly leverage your traffic and improve load time of your site. <br/>Warning: if set to true, all changes made in <code>Editor appearance</code> will have no affect on FCKeditor\'s behaviour.'),
+);
+*/
+
+ $form['output'] = array(
+ '#type' => 'fieldset',
+ '#title' => t('Cleanup and output'),
+ '#collapsible' => TRUE,
+ '#collapsed' => TRUE,
+ );
+
+ $form['output']['enter_mode'] = array(
+ '#type' => 'select',
+ '#title' => t('Enter mode'),
+ '#default_value' => $edit->settings['enter_mode'] ? $edit->settings['enter_mode'] : 'p',
+ '#options' => array('p' => '<p>', 'br' => '<br>', 'div' => '<div>'),
+ '#description' => t('Set which tag FCKeditor should use when [Enter] key is pressed.')
+ );
+
+ $form['output']['shift_enter_mode'] = array(
+ '#type' => 'select',
+ '#title' => t('Shift + Enter mode'),
+ '#default_value' => $edit->settings['shift_enter_mode'] ? $edit->settings['shift_enter_mode'] : 'br',
+ '#options' => array('p' => '<p>', 'br' => '<br>', 'div' => '<div>'),
+ '#description' => t('Set which tag FCKeditor should use when [Shift] + [Enter] is pressed.')
+ );
+
+ $form['output']['font_format'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Font formats'),
+ '#default_value' => $edit->settings['font_format'] ? $edit->settings['font_format'] : 'p;div;pre;address;h1;h2;h3;h4;h5;h6',
+ '#size' => 40,
+ '#maxlength' => 250,
+ '#description' => t('Semicolon separated list of HTML font formats. Allowed values are: p;div;pre;address;h1;h2;h3;h4;h5;h6'),
+ );
+
+ $form['output']['format_source'] = array(
+ '#type' => 'select',
+ '#title' => t('Apply source formatting'),
+ '#default_value' => $edit->settings['format_source'] ? $edit->settings['format_source'] : 't',
+ '#options' => array('t' => 'true', 'f' => 'false'),
+ '#description' => t('When set to "true" the editor will format the XHTML when switching from WYSIWYG view to Source view, by inserting line breaks on some tags endings and indenting paragraphs, tables and lists.'),
+ );
+
+ $form['output']['format_output'] = array(
+ '#type' => 'select',
+ '#title' => t('Format output'),
+ '#default_value' => $edit->settings['format_output'] ? $edit->settings['format_output'] : 't',
+ '#options' => array('t' => 'true', 'f' => 'false'),
+ '#description' => t('When set to "true" the editor will format the XHTML output by inserting line breaks on some tags endings and indenting paragraphs, tables and lists.'),
+ );
+
+/*
+$form['output']['output_conf'] = array(
+'#type' => 'select',
+'#title' => t('Ignore this section, use default settings defined in config files'),
+'#default_value' => $edit->settings['output_conf'] ? $edit->settings['output_conf'] : 'f',
+'#options' => array('f' => t('false'), 't' => t('true')),
+'#description' => t('Although it is less handy, defining settings only in config files (<code>fckconfig.js</code> and <code>fckeditor.config.js</code>) will slightly leverage your traffic and improve load time of your site. <br/>Warning: if set to true, all changes made in <code>Cleanup and output</code> will have no affect on FCKeditor\'s behaviour.'),
+);
+*/
+
+ $form['css'] = array(
+ '#type' => 'fieldset',
+ '#title' => t('CSS'),
+ '#collapsible' => TRUE,
+ '#collapsed' => TRUE
+ );
+
+ $form['css']['css_mode'] = array(
+ '#type' => 'select',
+ '#title' => t('Editor CSS'),
+ '#default_value' => $edit->settings['css_mode'] ? $edit->settings['css_mode'] : 'theme',
+ '#options' => array('theme' => t('use theme css'), 'self' => t('define css'), 'none' => t('FCKeditor default')),
+ '#description' => t('Defines the CSS to be used in the editor area.<br />use theme css - load style.css from current site theme.<br/>define css - enter path for css file below.<br />FCKeditor default - uses default CSS from editor.')
+ );
+
+ $form['css']['css_path'] = array(
+ '#type' => 'textfield',
+ '#title' => t('CSS path'),
+ '#default_value' => $edit->settings['css_path'],
+ '#size' => 40,
+ '#maxlength' => 255,
+ '#description' => t('Enter path to CSS file (<em>example: "css/editor.css"</em>) or a list of css files seperated by a comma (<em>example: /themes/garland/style.css,http://example.com/style.css</em>).<br />Macros: %h (host name: !host), %t (path to theme: !theme)<br />Be sure to select "define css" above.', array('!host' => base_path(), '!theme' => path_to_theme() . '/'))
+ );
+
+ $form['css']['css_style'] = array(
+ '#type' => 'item',
+ '#title' => t('CSS classes'),
+ '#value' => t('Requires manual configuration.'),
+ '#description' => t('Style dropdown list loads styles defined in <code>!fckstyles.xml</code>. Copy this file inside your theme directory (<code>!theme</code>) and adjust it to your needs. If you modify the original file, changes will be applied to all themes, however it may get overwritten if you upgrade FCKeditor.', array('!fckstyles.xml' => drupal_get_path('module', 'fckeditor').'/fckeditor/fckstyles.xml', '!theme' => path_to_theme() . '/fckstyles.xml'))
+ );
+
+// don't show useless options if IMCE is preferred
+if (function_exists('imce_integrate') && variable_get('imce_settings_fck', 0)) {
+ $form['fckeditor_upload_settings'] = array(
+ '#type' => 'fieldset',
+ '#title' => t('File browser settings'),
+ '#collapsible' => TRUE,
+ '#collapsed' => TRUE,
+ '#description' => t('The file browser settings are not diplayed because you have configured IMCE to handle file browsing.')
+ );
+}
+else {
+ $form['fckeditor_upload_settings'] = array(
+ '#type' => 'fieldset',
+ '#title' => t('File browser settings'),
+ '#collapsible' => TRUE,
+ '#collapsed' => TRUE,
+ '#description' => t('Set file browser settings. If you enable file uploads and disable basic and advanced file management, you will need to manage your images and other files with the core upload module or a contrib module like !imce. Please note that these options require manual configuration, check !readme for more information.<br />',
+ array(
+ '!imce' => l(t('IMCE'), 'http://drupal.org/project/imce'),
+ '!readme' => l('readme.txt', 'admin/help/fckeditor'),
+ )
+ )
+ );
+ /*
+ //This one is handled in Access Control page
+ $form['fckeditor_upload_settings']['upload_allow'] = array(
+ '#type' => 'select',
+ '#options' => array('f' => t('false'), 't' => t('true')),
+ '#title' => t('Allow FCKeditor file uploads'),
+ '#default_value' => $edit->settings['upload_allow'] ? $edit->settings['upload_allow'] : 'f',
+ '#description' => t("Allow file uploads."),
+ );
+ */
+ $form['fckeditor_upload_settings']['upload_basic'] = array(
+ '#type' => 'select',
+ '#options' => array('f' => t('false'), 't' => t('true')),
+ '#title' => t('Allow basic file management'),
+ '#default_value' => $edit->settings['upload_basic'] ? $edit->settings['upload_basic'] : 'f',
+ '#description' => t("Allow quick uploads. All files will be placed in the directory designated in the configuration file."),
+ );
+ $form['fckeditor_upload_settings']['upload_advanced'] = array(
+ '#type' => 'select',
+ '#options' => array('f' => t('false'), 't' => t('true')),
+ '#title' => t('Allow advanced file management'),
+ '#default_value' => $edit->settings['upload_advanced'] ? $edit->settings['upload_advanced'] : 'f',
+ '#description' => t('Allow file management in the advanced file manager. All files will be placed in subdirectories of the default drupal upload directory.'),
+ );
+}
+
+$form['submit'] = array(
+'#type' => 'submit',
+'#value' => $btn
+);
+
+return $form;
+}
+
+/**
* Search the field id for matches in array of matches
*
* @param $search
@@ -291,7 +1297,7 @@ var ".$js_id." = new FCKeditor( '".$element['#id']."' );
*/
function fckeditor_idsearch($search, $array) {
foreach ($array as $key => $value) {
- if (!empty($value) && preg_match('/^'.str_replace('*','.*',$value).'$/i', $search)) {
+ if (!empty($value) && preg_match('/^'.str_replace('*','.*',addslashes($value)).'$/i', $search)) {
// on any first match we know we're done here so return positive
return true;
}
@@ -301,24 +1307,63 @@ function fckeditor_idsearch($search, $array) {
/**
* Test if client can render the FCKeditor
- *
- * Check the user agent for a matching browser,
- * using HTTP_USER_AGENT because the browsers that are known to support FCKeditor are limited
+ * Use built-in test method in fckeditor.php
+ * If fckeditor.php is not found, return false (probably in such case fckeditor is not installed correctly)
*
* @return
* TRUE if the browser is reasonably capable
*/
function fckeditor_is_compatible_client() {
- $useragent = $_SERVER['HTTP_USER_AGENT'];
- if (strpos($useragent, 'MSIE') !== false && strpos($useragent, 'mac') === false && strpos($useragent, 'Opera') === false) {
- $browserversion = (int)substr($useragent, strpos($useragent, 'MSIE') + 5, 3);
- return ($browserversion >= 5.5);
+ $fckeditor_main_file = drupal_get_path('module', 'fckeditor') . '/fckeditor/fckeditor.php';
+ if (file_exists($fckeditor_main_file)) {
+ include $fckeditor_main_file;
+ if (function_exists('FCKeditor_IsCompatibleBrowser')) {
+ return FCKeditor_IsCompatibleBrowser();
+ }
+ else {
+ $fck = new FCKeditor("fake");
+ return $fck->IsCompatible();
+ }
+ }
+
+ return false;
+}
+
+function fckeditor_user_get_setting($user, $profile, $setting){
+ $default = array(
+ 'default' => 't',
+ 'show_toggle' => 't',
+ 'popup' => 'f',
+ 'skin' => 'default',
+ 'toolbar' => 'default',
+ 'expand' => 't',
+ 'width' => '100%',
+ 'lang' => 'en',
+ 'auto_lang' => 't',
+ );
+ $settings = $profile->settings;
+
+ if ($settings['allow_user_conf']) {
+ $status = isset($user->{"fckeditor_".$setting}) ? $user->{"fckeditor_".$setting} : (isset($settings[$setting]) ? $settings[$setting] : $default[$setting]);
}
- elseif (strpos($useragent, 'Gecko') !== false) {
- $browserversion = (int)substr($useragent, strpos($useragent, 'Gecko/') + 6, 8);
- return ($browserversion >= 20030210);
+ else {
+ $status = isset($settings[$setting]) ? $settings[$setting] : $default[$setting];
}
- else
- return false;
+
+ return $status;
+}
+
+function fckeditor_user_get_profile($account) {
+ $profile_name = db_result(db_query('SELECT s.name FROM {fckeditor_settings} s INNER JOIN {fckeditor_role} r ON r.name = s.name WHERE r.rid IN (%s)', implode(',', array_keys($account->roles))));
+ if ($profile_name){
+ return fckeditor_profile_load($profile_name);
+ }
+ else {
+ return FALSE;
+ }
+}
+
+function fckeditor_init() {
+ drupal_add_css(drupal_get_path('module', 'fckeditor') .'/fckeditor.css');
}
diff --git a/fckeditor.popup.html b/fckeditor.popup.html
index 6054ea9..6451e3e 100644
--- a/fckeditor.popup.html
+++ b/fckeditor.popup.html
@@ -1,6 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>FCKeditor</title>
+ <!-- $id$ -->
<script type="text/javascript">
// #### URLParams: holds all URL passed parameters (like ?Param1=Value1&Param2=Value2)
diff --git a/fckeditor.popup.js b/fckeditor.popup.js
index 5d0c9c5..ebd2133 100644
--- a/fckeditor.popup.js
+++ b/fckeditor.popup.js
@@ -1,4 +1,5 @@
+// $Id$
function FCKeditor_OpenPopup( popupUrl )
{
window.open( popupUrl, null, 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=1,dependent=yes' );
-} \ No newline at end of file
+}
diff --git a/fckeditor.utils.js b/fckeditor.utils.js
new file mode 100644
index 0000000..fe13aaf
--- /dev/null
+++ b/fckeditor.utils.js
@@ -0,0 +1,171 @@
+// $Id$
+var fckIsRunning = new Array;
+var fckIsLaunching = new Array;
+var fckLaunchedTextareaId = new Array;
+var fckLaunchedJsId = new Array;
+var fckFirstrun = new Array;
+
+function Toggle(js_id, textareaID, textTextarea, TextRTE)
+{
+ if (!fckIsRunning[js_id])
+ {
+ if (!fckIsLaunching[js_id])
+ {
+ fckIsLaunching[js_id] = true;
+ eval(js_id + '.ReplaceTextarea();');
+ }
+ setTimeout("Toggle('" + js_id + "','" + textareaID + "','" + textTextarea + "','" + TextRTE + "');",1000);
+ return ;
+ }
+
+ var oEditor ;
+ if ( typeof( FCKeditorAPI ) != 'undefined' )
+ oEditor = FCKeditorAPI.GetInstance( js_id );
+
+ // Get the _Textarea and _FCKeditor DIVs.
+ var eTextarea = document.getElementById( textareaID );
+ var eFCKeditor = document.getElementById( js_id );
+ var eFCKeditorDiv = document.getElementById('fck_' + js_id);
+ var text;
+
+ // If the _Textarea DIV is visible, switch to FCKeditor.
+ if ( eTextarea.style.display != 'none' )
+ {
+ document.getElementById('switch_' + js_id).innerHTML = textTextarea;
+
+ // Switch the DIVs display.
+ eTextarea.style.display = 'none';
+ eFCKeditorDiv.style.display = '';
+
+ text = eTextarea.value;
+ if ($('input[@class=teaser-button]').attr('value') == Drupal.t('Join summary')) {
+ var val = $('#edit-teaser-js').val();
+ if (val && val.length) {
+ text = val + '<!--break-->' + text;
+ }
+ }
+ if ( text.length ) {
+ oEditor.SetHTML( text, false);
+ }
+
+ // This is a hack for Gecko 1.0.x ... it stops editing when the editor is hidden.
+ if (oEditor && !document.all)
+ {
+ if (oEditor.EditMode == FCK_EDITMODE_WYSIWYG)
+ oEditor.MakeEditable() ;
+ }
+ $('div[@class=teaser-button-wrapper]').hide();
+ $('#edit-teaser-js').parent().hide();
+ $('#edit-teaser-include').parent().show();
+ }
+ else
+ {
+ if (fckFirstrun[js_id]) {
+ fckFirstrun[js_id] = false;
+ }
+ document.getElementById('switch_' + js_id).innerHTML = TextRTE;
+
+ var text = oEditor.GetHTML();
+ var t = text.indexOf('<!--break-->');
+ if (t != -1) {
+ $('#edit-teaser-js').val(text.slice(0,t));
+ eTextarea.value = text.slice(t+12);
+ $('#edit-teaser-js').parent().show();
+ $('#edit-teaser-js').attr('disabled', '');
+ if ($('input[@class=teaser-button]').attr('value') != Drupal.t('Join summary')) {
+ try {$('input[@class=teaser-button]').click();} catch(e) {$('input[@class=teaser-button]').val(Drupal.t('Join summary'));}
+ }
+ }
+ else {
+ $('#edit-teaser-js').attr('disabled', 'disabled');
+ if ($('input[@class=teaser-button]').attr('value') != Drupal.t('Split summary at cursor')) {
+ try {$('input[@class=teaser-button]').click();} catch(e) {$('input[@class=teaser-button]').val(Drupal.t('Split summary at cursor'));}
+ }
+ // Set the textarea value to the editor value.
+ eTextarea.value = text;
+ }
+
+ // Switch the DIVs display.
+ eTextarea.style.display = '';
+ eFCKeditorDiv.style.display = 'none';
+ $('div[@class=teaser-button-wrapper]').show();
+ }
+}
+
+function CreateToggle(elId, jsId, fckeditorOn)
+{
+ var ta = document.getElementById(elId);
+ var ta2 = document.getElementById('fck_' + jsId);
+
+ ta2.value = ta.value;
+ ta.parentNode.insertBefore(ta2, ta);
+ if (fckeditorOn)
+ ta.style.display = 'none';
+ else
+ ta2.style.display = 'none';
+}
+
+// The FCKeditor_OnComplete function is a special function called everytime an
+// editor instance is completely loaded and available for API interactions.
+function FCKeditor_OnComplete( editorInstance )
+{
+ fckIsRunning[editorInstance.Name] = true ;
+ fckLaunchedTextareaId.push(editorInstance.Config['TextareaID']) ;
+ fckLaunchedJsId.push(editorInstance.Name) ;
+ fckFirstrun[editorInstance.Name] = true;
+
+ // Enable the switch button. It is disabled at startup, waiting the editor to be loaded.
+ document.getElementById('switch_' + editorInstance.Name).style.display = '' ;
+
+ // If the textarea isn't visible update the content from the editor.
+ editorInstance.LinkedField.form.onsubmit = function() {
+ for( var i = 0 ; i < fckLaunchedJsId.length ; i++ ) {
+ if ( document.getElementById( fckLaunchedTextareaId[i] ).style.display == 'none' )
+ {
+ var text = FCKeditorAPI.GetInstance( fckLaunchedJsId[i] ).GetXHTML();
+ var t = text.indexOf('<!--break-->');
+ if (t != -1) {
+ $('#edit-teaser-js').val(text.slice(0,t));
+ document.getElementById( fckLaunchedTextareaId[i] ).value = text.slice(t+12);
+ }
+ else {
+ $('#edit-teaser-js').val('');
+ document.getElementById( fckLaunchedTextareaId[i] ).value = text;
+ if ($('input[@class=teaser-button]').attr('value') == Drupal.t('Join summary')) {
+ try {$('input[@class=teaser-button]').click();} catch(e) {$('input[@class=teaser-button]').val(Drupal.t('Join summary'));}
+ }
+ }
+ }
+ }
+ }
+
+ $('#edit-teaser-js').attr('disabled', '');
+ $('div[@class=teaser-button-wrapper]').hide();
+ $('#edit-teaser-js').parent().hide();
+ $('#edit-teaser-include').parent().show();
+
+ // -- some hacks for IE
+ var oldCheckAndRemovePaddingNode = editorInstance.EditorWindow.parent.FCKDomTools.CheckAndRemovePaddingNode ;
+
+ editorInstance.EditorWindow.parent.FCKDomTools.CheckAndRemovePaddingNode = function( doc, tagName, dontRemove )
+ {
+ try
+ {
+ oldCheckAndRemovePaddingNode( doc, tagName, dontRemove ) ;
+ }
+ catch(e)
+ {}
+ }
+
+ editorInstance.Events.FireEvent = function( eventName, params )
+ {
+ try
+ {
+ return editorInstance.EditorWindow.parent.FCKEvents.prototype.FireEvent.call( this, eventName, params ) ;
+ }
+ catch(e)
+ {}
+ }
+ // -- some hacks for IE
+}
+
diff --git a/plugins/drupalbreak/drupalbreak.gif b/plugins/drupalbreak/drupalbreak.gif
new file mode 100644
index 0000000..2bb18d6
--- /dev/null
+++ b/plugins/drupalbreak/drupalbreak.gif
Binary files differ
diff --git a/plugins/drupalbreak/fckplugin.js b/plugins/drupalbreak/fckplugin.js
new file mode 100644
index 0000000..8427261
--- /dev/null
+++ b/plugins/drupalbreak/fckplugin.js
@@ -0,0 +1,198 @@
+// $Id$
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2003-2007 Frederico Caldeira Knabben
+ *
+ * == BEGIN LICENSE ==
+ *
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ *
+ * - GNU General Public License Version 2 or later (the "GPL")
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ * - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ * http://www.gnu.org/licenses/lgpl.html
+ *
+ * - Mozilla Public License Version 1.1 or later (the "MPL")
+ * http://www.mozilla.org/MPL/MPL-1.1.html
+ *
+ * == END LICENSE ==
+ *
+ * Plugin: add support for <!--break--> tag inside Drupal
+ * Source: http://drupal.org/node/81893
+ */
+
+var pBreakBorderStyle = "#FF0000 1px dotted" ;
+
+// Define the command.
+var FCKDrupalBreak = function( name )
+{
+ this.Name = name ;
+ this.EditMode = FCK.EditMode ;
+}
+
+FCKDrupalBreak.prototype.Execute = function()
+{
+ if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG )
+ return ;
+
+ FCKUndo.SaveUndoStep() ;
+
+ switch ( this.Name )
+ {
+ case 'Break' :
+ this.RemoveOldBreaks();
+ var e = FCK.EditorDocument.createComment( 'break' ) ;
+ oFakeImage = FCK.InsertElement( FCKDocumentProcessor_CreateFakeImage( 'FCK__PageBreak', e ) ) ;
+ oFakeImage.setAttribute( "_drupalbreak", "true" ) ;
+ oFakeImage.style.borderTop = oFakeImage.style.borderBottom = pBreakBorderStyle ;
+ this.MoveBreakOutsideElement();
+ break;
+ default :
+ break;
+ }
+}
+
+FCKDrupalBreak.prototype.RemoveOldBreaks = function()
+{
+ // get all elements in FCK document
+ var elements = FCK.EditorDocument.getElementsByTagName( 'img' ) ;
+
+ // check every element for childNodes
+ var i = 0;
+ var next ;
+ while ( element = elements[i++] )
+ {
+ if ( element.getAttribute( '_drupalbreak' ) == "true" )
+ {
+ element.parentNode.removeChild( element ) ;
+ }
+ }
+}
+
+FCKDrupalBreak.prototype.MoveBreakOutsideElement = function()
+{
+ FCK.FixBody();
+ // get all elements in FCK document
+ var elements = FCK.EditorDocument.getElementsByTagName( 'img' ) ;
+
+ // check every element for childNodes
+ var i = 0;
+ var next ;
+ while ( element = elements[i++] )
+ {
+ if ( element.getAttribute( '_drupalbreak' ) == "true" )
+ {
+ while( ( next = element.parentNode.nodeName.toLowerCase() ) != 'body' )
+ {
+ //if we are inside p or div, close immediately this tag, insert break tag,
+ //create new element and move remaining siblings to the next element
+ if ( ( next == 'div' || next == 'p' ) && ( element.parentNode.parentNode.nodeName.toLowerCase() == 'body' ) )
+ {
+ var oParent = element.parentNode ;
+ var oDiv = FCK.EditorDocument.createElement( next.toUpperCase() ) ;
+ var sibling ;
+
+ while( sibling = element.nextSibling )
+ oDiv.appendChild( sibling ) ;
+
+ if ( oDiv.childNodes.length )
+ {
+ if ( oParent.nextSibling )
+ FCK.EditorDocument.body.insertBefore( oDiv, oParent.nextSibling ) ;
+ else
+ FCK.EditorDocument.body.appendChild( oDiv ) ;
+ }
+
+ if ( element.parentNode.nextSibling )
+ element.parentNode.parentNode.insertBefore( element, element.parentNode.nextSibling ) ;
+ else
+ element.parentNode.parentNode.appendChild( element ) ;
+
+ if ( !oParent.childNodes.length )
+ FCK.EditorDocument.body.removeChild( oParent ) ;
+
+ //we must be sure the bogus node is available to make cursor blinking
+ if ( FCKBrowserInfo.IsGeckoLike )
+ FCKTools.AppendBogusBr( oParent ) ;
+
+ break ;
+ }
+ else
+ {
+ if ( element.parentNode.nextSibling )
+ element.parentNode.parentNode.insertBefore( element, element.parentNode.nextSibling ) ;
+ else
+ element.parentNode.parentNode.appendChild( element ) ;
+ }
+ }
+ }
+ }
+}
+
+FCKDrupalBreak.prototype.GetState = function()
+{
+ return ( FCK.EditMode == FCK_EDITMODE_WYSIWYG ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ) ;
+}
+
+// Register the Drupal tag commands.
+FCKCommands.RegisterCommand( 'DrupalBreak', new FCKDrupalBreak( 'Break' ) ) ;
+// Create the Drupal tag buttons.
+var oDrupalItem = new FCKToolbarButton( 'DrupalBreak', 'Break', null, FCK_TOOLBARITEM_ICONTEXT, true, true ) ;
+oDrupalItem.IconPath = FCKConfig.PluginsPath + 'drupalbreak/drupalbreak.gif';
+FCKToolbarItems.RegisterItem( 'DrupalBreak', oDrupalItem ) ;
+
+// after switch in to source mode and back proccess page and insert fake
+// image for break again
+// Drupal Page Breaks Processor
+
+var FCKDrupalBreaksProcessor = FCKDocumentProcessor.AppendNew() ;
+FCKDrupalBreaksProcessor.ProcessDocument = function( document )
+{
+ // get all elements in FCK document
+ var elements = document.getElementsByTagName( '*' ) ;
+
+ // check every element for childNodes
+ var i = 0;
+ while (element = elements[i++]) {
+ var nodes = element.childNodes;
+
+ var j = 0;
+ while (node = nodes[j++]) {
+ if (node.nodeName == '#comment') {
+ var re = /\{\d+\}/ ;
+ var PContent;
+ if (re.test(node.nodeValue))
+ PContent = FCKConfig.ProtectedSource.Revert('<!--' + node.nodeValue + '-->', false);
+ if (node.nodeValue == 'break' || PContent == '<!--break-->') {
+ var oFakeImage = FCKDocumentProcessor_CreateFakeImage( 'FCK__PageBreak', node.cloneNode(true) ) ;
+ oFakeImage.setAttribute( "_drupalbreak", "true" ) ;
+ oFakeImage.style.borderTop = oFakeImage.style.borderBottom = pBreakBorderStyle ;
+ node.parentNode.insertBefore( oFakeImage, node ) ;
+ node.parentNode.removeChild( node ) ;
+ }
+ }
+ }
+ }
+ FCKDrupalBreak.prototype.MoveBreakOutsideElement();
+}
+
+if ( !FCK.Config.ProtectedSource._RevertOld )
+ FCK.Config.ProtectedSource._RevertOld = FCK.Config.ProtectedSource.Revert ;
+
+FCK.Config.ProtectedSource.Revert = function( html, clearBin )
+{
+ // Call the original code.
+ var result = FCK.Config.ProtectedSource._RevertOld ( html, clearBin ) ;
+
+ if ( typeof FCKDrupalPageBreak !="undefined" && typeof FCKDrupalBreak !="undefined" )
+ var re = /<(p|div)>((?:<!--pagebreak-->|<!--break-->)+)<\/\1>/gi ;
+ else if ( typeof FCKDrupalBreak !="undefined" )
+ var re = /<(p|div)>(<!--break-->)+<\/\1>/gi ;
+ else if ( typeof FCKDrupalPageBreak !="undefined" )
+ var re = /<(p|div)>(<!--pagebreak-->)+<\/\1>/gi ;
+
+ result = result.replace( re, '$2' );
+ return result ;
+} \ No newline at end of file
diff --git a/plugins/drupalbreak/lang/en.js b/plugins/drupalbreak/lang/en.js
new file mode 100644
index 0000000..a21c533
--- /dev/null
+++ b/plugins/drupalbreak/lang/en.js
@@ -0,0 +1 @@
+FCKLang.DrupalBreakTitle = 'Insert Teaser Break' ;
diff --git a/plugins/drupalpagebreak/drupalpagebreak.gif b/plugins/drupalpagebreak/drupalpagebreak.gif
new file mode 100644
index 0000000..e0b0ff3
--- /dev/null
+++ b/plugins/drupalpagebreak/drupalpagebreak.gif
Binary files differ
diff --git a/plugins/drupalpagebreak/fckplugin.js b/plugins/drupalpagebreak/fckplugin.js
new file mode 100644
index 0000000..cd717bd
--- /dev/null
+++ b/plugins/drupalpagebreak/fckplugin.js
@@ -0,0 +1,181 @@
+// $Id$
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2003-2007 Frederico Caldeira Knabben
+ *
+ * == BEGIN LICENSE ==
+ *
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ *
+ * - GNU General Public License Version 2 or later (the "GPL")
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ * - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ * http://www.gnu.org/licenses/lgpl.html
+ *
+ * - Mozilla Public License Version 1.1 or later (the "MPL")
+ * http://www.mozilla.org/MPL/MPL-1.1.html
+ *
+ * == END LICENSE ==
+ *
+ * Plugin: add support for <!--pagebreak--> tag inside Drupal
+ * Source: http://drupal.org/node/81893
+ */
+
+// Define the command.
+var FCKDrupalPageBreak = function( name )
+{
+ this.Name = name ;
+ this.EditMode = FCK.EditMode;
+}
+
+FCKDrupalPageBreak.prototype.Execute = function()
+{
+ if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG )
+ return ;
+
+ FCKUndo.SaveUndoStep() ;
+
+ switch ( this.Name )
+ {
+ case 'Break' :
+ var e = FCK.EditorDocument.createComment( 'pagebreak' ) ;
+ var oFakeImage = FCK.InsertElement( FCKDocumentProcessor_CreateFakeImage( 'FCK__PageBreak', e ) ) ;
+ oFakeImage.setAttribute( "_drupalpagebreak", "true" ) ;
+ this.MoveBreakOutsideElement();
+ break;
+ default :
+ break;
+ }
+}
+
+FCKDrupalPageBreak.prototype.MoveBreakOutsideElement = function()
+{
+ FCK.FixBody();
+ // get all elements in FCK document
+ var elements = FCK.EditorDocument.getElementsByTagName( 'img' ) ;
+
+ // check every element for childNodes
+ var i = 0;
+ var next ;
+ while ( element = elements[i++] )
+ {
+ if ( element.getAttribute( '_drupalpagebreak' ) == "true" )
+ {
+ while( ( next = element.parentNode.nodeName.toLowerCase() ) != 'body' )
+ {
+ //if we are inside p or div, close immediately this tag, insert break tag,
+ //create new element and move remaining siblings to the next element
+ if ( ( next == 'div' || next == 'p' ) && ( element.parentNode.parentNode.nodeName.toLowerCase() == 'body' ) )
+ {
+ var oParent = element.parentNode ;
+ var oDiv = FCK.EditorDocument.createElement( next.toUpperCase() ) ;
+ var sibling ;
+
+ while( sibling = element.nextSibling )
+ oDiv.appendChild( sibling ) ;
+
+ if ( oDiv.childNodes.length )
+ {
+ if ( oParent.nextSibling )
+ FCK.EditorDocument.body.insertBefore( oDiv, oParent.nextSibling ) ;
+ else
+ FCK.EditorDocument.body.appendChild( oDiv ) ;
+ }
+
+ if ( element.parentNode.nextSibling )
+ element.parentNode.parentNode.insertBefore( element, element.parentNode.nextSibling ) ;
+ else
+ element.parentNode.parentNode.appendChild( element ) ;
+
+ if ( !oParent.childNodes.length )
+ FCK.EditorDocument.body.removeChild( oParent ) ;
+
+ //if we put pagebreak next to another pagrebreak, remove it
+ if ( element.nextSibling && element.nextSibling.getAttribute( '_drupalpagebreak' ) == "true")
+ element.parentNode.removeChild( element.nextSibling ) ;
+
+ //we must be sure the bogus node is available to make cursor blinking
+ if ( FCKBrowserInfo.IsGeckoLike )
+ FCKTools.AppendBogusBr( oParent ) ;
+
+ break ;
+ }
+ else
+ {
+ if ( element.parentNode.nextSibling )
+ element.parentNode.parentNode.insertBefore( element, element.parentNode.nextSibling ) ;
+ else
+ element.parentNode.parentNode.appendChild( element ) ;
+ }
+ }
+ }
+ }
+}
+
+FCKDrupalPageBreak.prototype.GetState = function()
+{
+ return ( FCK.EditMode == FCK_EDITMODE_WYSIWYG ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ) ;
+}
+
+// Register the Drupal tag commands.
+FCKCommands.RegisterCommand( 'DrupalPageBreak', new FCKDrupalPageBreak( 'Break' ) ) ;
+// Create the Drupal tag buttons.
+var oDrupalItem = new FCKToolbarButton( 'DrupalPageBreak', 'Break', null, FCK_TOOLBARITEM_ICONTEXT, true, true ) ;
+oDrupalItem.IconPath = FCKConfig.PluginsPath + 'drupalpagebreak/drupalpagebreak.gif';
+FCKToolbarItems.RegisterItem( 'DrupalPageBreak', oDrupalItem ) ;
+
+// after switch in to source mode and back proccess page and insert fake
+// image for break again
+// Drupal Page Breaks Processor
+
+var FCKDrupalPageBreaksProcessor = FCKDocumentProcessor.AppendNew() ;
+FCKDrupalPageBreaksProcessor.ProcessDocument = function( document )
+{
+ // get all elements in FCK document
+ var elements = document.getElementsByTagName( '*' ) ;
+
+ // check every element for childNodes
+ var i = 0;
+ while (element = elements[i++]) {
+ var nodes = element.childNodes;
+
+ var j = 0;
+ while (node = nodes[j++]) {
+ if (node.nodeName == '#comment') {
+ var re = /\{\d+\}/ ;
+ var PContent;
+ if (re.test(node.nodeValue))
+ PContent = FCKConfig.ProtectedSource.Revert('<!--' + node.nodeValue + '-->', false);
+
+ if (node.nodeValue == 'pagebreak' || PContent == '<!--pagebreak-->') {
+ var oFakeImage = FCKDocumentProcessor_CreateFakeImage( 'FCK__PageBreak', node.cloneNode(true) ) ;
+ oFakeImage.setAttribute( "_drupalpagebreak", "true" ) ;
+ node.parentNode.insertBefore( oFakeImage, node ) ;
+ node.parentNode.removeChild( node ) ;
+ }
+ }
+ }
+ }
+ FCKDrupalBreak.prototype.MoveBreakOutsideElement();
+}
+
+if ( !FCK.Config.ProtectedSource._RevertOld )
+ FCK.Config.ProtectedSource._RevertOld = FCK.Config.ProtectedSource.Revert ;
+
+FCK.Config.ProtectedSource.Revert = function( html, clearBin )
+{
+ // Call the original code.
+ var result = FCK.Config.ProtectedSource._RevertOld ( html, clearBin ) ;
+
+ if ( typeof FCKDrupalPageBreak !="undefined" && typeof FCKDrupalBreak !="undefined" )
+ var re = /<(p|div)>((?:<!--pagebreak-->|<!--break-->)+)<\/\1>/gi ;
+ else if ( typeof FCKDrupalBreak !="undefined" )
+ var re = /<(p|div)>(<!--break-->)+<\/\1>/gi ;
+ else if ( typeof FCKDrupalPageBreak !="undefined" )
+ var re = /<(p|div)>(<!--pagebreak-->)+<\/\1>/gi ;
+
+ result = result.replace( re, '$2' );
+ return result ;
+} \ No newline at end of file
diff --git a/plugins/drupalpagebreak/lang/en.js b/plugins/drupalpagebreak/lang/en.js
new file mode 100644
index 0000000..a21c533
--- /dev/null
+++ b/plugins/drupalpagebreak/lang/en.js
@@ -0,0 +1 @@
+FCKLang.DrupalBreakTitle = 'Insert Teaser Break' ;
diff --git a/po/fckeditor.pot b/po/fckeditor.pot
new file mode 100644
index 0000000..ae9e44c
--- /dev/null
+++ b/po/fckeditor.pot
@@ -0,0 +1,553 @@
+# $Id$
+#
+# LANGUAGE translation of Drupal (general)
+# Copyright YEAR NAME <EMAIL@ADDRESS>
+# No version information was available in the source files.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: \n"
+"POT-Creation-Date: 2007-10-30 09:59+0100\n"
+"PO-Revision-Date: 2007-10-30 10:44+0100\n"
+"Last-Translator: Wiktor Walc <w.walc@fckeditor.net>\n"
+"Language-Team: FCKeditor <EMAIL@ADDRESS>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: Plural-Forms: nplurals=2; plural=(n != 1);\\n\n"
+"X-Poedit-Language: LANGUAGE\n"
+"X-Poedit-Country: COUNTRY\n"
+
+#: fckeditor.module:45
+msgid "Enables the usage of FCKeditor (WYSIWYG editor) instead of plain text fields."
+msgstr ""
+
+#: fckeditor.module:48
+msgid "<p>Note: FCKeditor is highly configurable. The most commonly used features are listed below. If you want to take a look at all available settings, open <code>!fckconfig</code> and then customize <code>!fckeditor_config</code> to your needs. This is also the only way to define new toolbar sets. It is advised to not edit <code>fckconfig.js</code> because you may overwrite it accidentally when you update the editor.</p>"
+msgstr ""
+
+#: fckeditor.module:51;59
+msgid "<p>The FCKeditor module allows Drupal to replace textarea fields with a rich text or <acronym title=\"What You See Is What You Get\">WYSIWYG</acronym> editor. This editor brings many of the powerful functionalities of known desktop editors like Word to the web. It's relatively lightweight and doesn't require any kind of installation on the client computer.</p><p>More information is located at the !fckeditorlink. A small user guide is located at !userguidelink.</p>"
+msgstr ""
+
+#: fckeditor.module:53;61;66;71
+msgid "FCKeditor homepage"
+msgstr ""
+
+#: fckeditor.module:54;62
+msgid "FCKeditor userguide"
+msgstr ""
+
+#: fckeditor.module:56
+msgid "<p>Profiles can be defined based on user roles. A FCKeditor profile can define which pages receive this FCKeditor capability, what buttons or themes are enabled for the editor, how the editor is displayed, and a few other editor functions.</p><p>Lastly, only users with the <code>!access1</code> <a href=\"!url\">permission</a> will be able to use FCKeditor.</p>"
+msgstr ""
+
+#: fckeditor.module:56;919;956
+msgid "access fckeditor"
+msgstr ""
+
+#: fckeditor.module:64
+msgid "<h3>Installation</h3><p>Go to the !fckeditorlink and download the latest version. Then uncompress the contents of the \"fckeditor\" directory of the downloaded file to %fckeditordir.</p>"
+msgstr ""
+
+#: fckeditor.module:69
+msgid "<h3>Installation troubleshooting</h3><p>If your FCKeditor does not show you must check if all files are extracted correctly. The directory %fckeditordir should have the following files <code>fckeditor.js, fckconfig.js, fckstyles.xml, fcktemplates.xml</code> and a directory named <code>editor</code>.</p>"
+msgstr ""
+
+#: fckeditor.module:74
+msgid "The correct directory structure is as follows: <pre>!structure</pre>"
+msgstr ""
+
+#: fckeditor.module:77
+msgid "<h3>Configuration</h3><ol><li>Modify the fckeditor.config.js file to custom your needs (optional).<br />You may copy the needed configuration lines from the default FCKeditor configuration settings (modules/fckeditor/fckeditor/fckconfig.js), the lines in fckeditor.config.js will override most settings.</li><li>Enable the module as usual from Drupal's admin pages.</li><li>Grant permissions for use of FCKeditor in <code>!path2</code></li><li>Under <code>!path1</code>, create the fckeditor profiles. In each profile you can choose which textareas will be replaced by FCKeditor, select default toolbar and configure some more advanced settings </li><li>For the Rich Text Editing to work you also need to configure your !filterlink for the users that may access Rich Text Editing. Either grant those users Full HTML access or use the following: <br/><code>!filter</code>. </li><li>To have a better control over line breaks, you may disable <code>Line break converter</code> in the chosen filter.</li></ol>"
+msgstr ""
+
+#: fckeditor.module:79
+msgid "Administer > Settings > FCKeditor"
+msgstr ""
+
+#: fckeditor.module:80
+msgid "Administer > User Management > Access Control"
+msgstr ""
+
+#: fckeditor.module:85
+msgid "filters"
+msgstr ""
+
+#: fckeditor.module:87
+msgid "<h3>Plugins: Teaser break and Pagebreak</h3><p>By default, FCKeditor module comes with two plugins that can handle teaser break (&lt;!--break--&gt;) and pagebreak (&lt;!--pagebreak--&gt;). You can enable any (or even both) of them.<ol><li>Open <code>!fckeditor.config.js</code> and uncomment these three lines: <pre>!code</pre></li><li>The second step is to add buttons to the toolbar (in the same file). The button names are: <code>DrupalBreak, DrupalPageBreak</code>. For example if you have a toolbar with an array of buttons defined as follows: <pre>!buttons1</pre> simply add those two buttons at the end of array: <pre>!buttons2</pre> (remember about single quotes).</li></ol></p>"
+msgstr ""
+
+#: fckeditor.module:98
+msgid "<h3>Uploading images and files</h3><p>There are three ways of uploading files: By using the built-in file browser, by using a module like !imce or using the core upload module.</p>"
+msgstr ""
+
+#: fckeditor.module:100;1229
+msgid "IMCE"
+msgstr ""
+
+#: fckeditor.module:103
+msgid "<h3>Security</h3><p>Note that enabling file uploads is <strong>a security risk</strong>. That's why there is a !link in Administer > User Management > Access Control for enabling the file browser to certain groups.</p>"
+msgstr ""
+
+#: fckeditor.module:103
+msgid "separate permission"
+msgstr ""
+
+#: fckeditor.module:105
+msgid "<h3>How to enable the file browser</h3><p>The editor gives the end user the flexibility to create a custom file browser that can be integrated on it. The included file browser allows users to view the content of a specific directory on the server and add new content to that directory (create folders and upload files).</p><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>!config1</code><br/> and <br/><code>!config2</code> <br/> (FCKeditor 2.3.x - 2.4.x)<br/><br/> or <code>!config3</code> <br/> (FCKeditor 2.5+) </p><p>In this file you will need to enable the file browser:<br /><code>&#36;Config['Enabled'] = true;</code></p><p>To use the drupal files directory you also need to adjust the following variables in the connector configuration:<br/><code>&#36;Config['UserFilesPath']</code> and <code>&#36;Config['UserFilesAbsolutePath']</code>.<br/>Point <code>&#36;Config['UserFilesPath']</code> to the path to drupal &quot;files&quot; directory and set <code>&#36;Config['UserFilesAbsolutePath']</code> to the absolute path to the same directory.</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 ('!filesdir'). These directories must have the same privileges as the drupal files directory. In some cases these directories must be world writable (chmod 0777).</p>"
+msgstr ""
+
+#: fckeditor.module:112
+msgid "<h3>Making File Browser more secure</h3><p>Please be aware that enabling file browser simply by setting <code>&#36;Config['Enabled'] = true;</code> theoretically enables it for each user (with a little bit of hackery, it is possible to use file browser without appropiate Drupal permissions). The more secure way of enabling file browser is as follows:</p><ol><li>Instead of setting <br/> <code>&#36;Config['Enabled'] = true ;</code><br/> add the following code: <pre>!snippet</pre> straight after <code>&#36;Config['Enabled'] = false ;</code><br/>This code enables file browser only to users that have <a href="!url">!access1</a> permission.<br/>Note: if you don't set <code>&#36;drupal_path</code> correctly, FCKeditor will find it out by itself.</li><li>As of Drupal 5.2, additional step is required: <br/> locate file named <code>settings.php</code> inside your drupal directory (usually <code>sites/default/settings.php</code>) and set <code>&#36;cookie_domain</code> variable to the appropiate domain (remember to uncomment that line).</li></ol>"
+msgstr ""
+
+#: fckeditor.module:136
+msgid "allow fckeditor file uploads"
+msgstr ""
+
+#: fckeditor.module:149
+msgid "administer fckeditor"
+msgstr ""
+
+#: fckeditor.module:200
+#: fckeditor.info:0
+msgid "FCKeditor"
+msgstr ""
+
+#: fckeditor.module:202
+msgid "Configure the rich editor."
+msgstr ""
+
+#: fckeditor.module:223
+msgid "You must give a profile name."
+msgstr ""
+
+#: fckeditor.module:227
+msgid "You must select at least one role."
+msgstr ""
+
+#: fckeditor.module:250
+msgid "administer"
+msgstr ""
+
+#: fckeditor.module:251
+msgid "fckeditor"
+msgstr ""
+
+#: fckeditor.module:252
+msgid "Add new FCKeditor profile"
+msgstr ""
+
+#: fckeditor.module:258
+msgid "Edit FCKeditor profile"
+msgstr ""
+
+#: fckeditor.module:264
+msgid "Deleted profile"
+msgstr ""
+
+#: fckeditor.module:268;927
+msgid "Create profile"
+msgstr ""
+
+#: fckeditor.module:269;931
+msgid "Update profile"
+msgstr ""
+
+#: fckeditor.module:272
+msgid "Your FCKeditor profile has been updated."
+msgstr ""
+
+#: fckeditor.module:272
+msgid "Your FCKeditor profile has been created."
+msgstr ""
+
+#: fckeditor.module:281
+msgid "FCKeditor settings"
+msgstr ""
+
+#: fckeditor.module:285
+msgid "Could not find the FCKeditor engine installed at <strong>!fckeditor-directory</strong>. Please <a href=\"http://www.fckeditor.net/download\">download FCKeditor</a>, uncompress it and copy the folder into !fckeditor-path."
+msgstr ""
+
+#: fckeditor.module:321
+msgid "Profile"
+msgstr ""
+
+#: fckeditor.module:321
+msgid "Roles"
+msgstr ""
+
+#: fckeditor.module:321
+msgid "Operations"
+msgstr ""
+
+#: fckeditor.module:323
+msgid "edit"
+msgstr ""
+
+#: fckeditor.module:323
+msgid "delete"
+msgstr ""
+
+#: fckeditor.module:326
+msgid "<p><a href=\"!create-profile-url\">Create new profile</a></p>"
+msgstr ""
+
+#: fckeditor.module:329
+msgid "No profiles found. Click here to <a href=\"!create-profile-url\">create a new profile</a>."
+msgstr ""
+
+#: fckeditor.module:457;458
+msgid "Switch to plain text editor"
+msgstr ""
+
+#: fckeditor.module:457;458
+msgid "Switch to rich text editor"
+msgstr ""
+
+#: fckeditor.module:599
+msgid "Open rich editor"
+msgstr ""
+
+#: fckeditor.module:632
+msgid "Rich Text Editor settings"
+msgstr ""
+
+#: fckeditor.module:640;1041
+msgid "Default state"
+msgstr ""
+
+#: fckeditor.module:642;682;1043;1083
+msgid "enabled"
+msgstr ""
+
+#: fckeditor.module:642;682;1043;1083
+msgid "disabled"
+msgstr ""
+
+#: fckeditor.module:643
+msgid "Should rich-text editing be enabled or disabled by default in textarea fields? If disabled, rich text editor may still be enabled using toggle or popup window."
+msgstr ""
+
+#: fckeditor.module:648;1049
+msgid "Show disable/enable rich text editor toggle"
+msgstr ""
+
+#: fckeditor.module:650;658;707;964;1051;1059;1108;1246;1253
+msgid "true"
+msgstr ""
+
+#: fckeditor.module:650;658;707;964;1051;1059;1108;1246;1253
+msgid "false"
+msgstr ""
+
+#: fckeditor.module:651
+msgid "Whether or not to show the disable/enable rich text editor toggle below the textarea. Works only if FCKeditor is not running a popup window (see below)."
+msgstr ""
+
+#: fckeditor.module:656;1057
+msgid "Use FCKeditor in a popup window"
+msgstr ""
+
+#: fckeditor.module:659;1060
+msgid "If this option is enabled a link to a popup window will be used instead of a textarea replace."
+msgstr ""
+
+#: fckeditor.module:664;1065
+msgid "Skin"
+msgstr ""
+
+#: fckeditor.module:667
+msgid "Choose a FCKeditor skin."
+msgstr ""
+
+#: fckeditor.module:672;1073
+msgid "Toolbar"
+msgstr ""
+
+#: fckeditor.module:675
+msgid "Choose a FCKeditor toolbar set."
+msgstr ""
+
+#: fckeditor.module:680;1081
+msgid "Start the toolbar expanded"
+msgstr ""
+
+#: fckeditor.module:683;1084
+msgid "The toolbar start expanded or collapsed."
+msgstr ""
+
+#: fckeditor.module:688;1089
+msgid "Width"
+msgstr ""
+
+#: fckeditor.module:690;1091
+msgid "Width in pixels or percent. Ex: 400 or 100%"
+msgstr ""
+
+#: fckeditor.module:697;1098
+msgid "Language"
+msgstr ""
+
+#: fckeditor.module:700;1101
+msgid "The language for the FCKeditor interface."
+msgstr ""
+
+#: fckeditor.module:705;1106
+msgid "Auto-detect language"
+msgstr ""
+
+#: fckeditor.module:708;1109
+msgid "Use auto detect user language feature."
+msgstr ""
+
+#: fckeditor.module:919
+msgid "You must <a href=\"!access-control-url\">assign</a> at least one role with the 'access fckeditor' permission before creating a profile."
+msgstr ""
+
+#: fckeditor.module:922
+msgid "You will not be allowed to create a new profile since all user roles have already been assigned profiles. Either remove an existing fckeditor profile from at least one role or assign another role the 'access fckeditor' permission."
+msgstr ""
+
+#: fckeditor.module:925
+msgid "Not all user roles are shown since they already have fckeditor profiles. You must first unassign profiles in order to add them to a new one."
+msgstr ""
+
+#: fckeditor.module:936
+msgid "Basic setup"
+msgstr ""
+
+#: fckeditor.module:943
+msgid "Profile name"
+msgstr ""
+
+#: fckeditor.module:947
+msgid "Enter a name for this profile. This name is only visible within the fckeditor administration page."
+msgstr ""
+
+#: fckeditor.module:953
+msgid "Roles allowed to use this profile"
+msgstr ""
+
+#: fckeditor.module:956
+msgid "Check at least one role. Only roles with '!access1' permission will be shown here."
+msgstr ""
+
+#: fckeditor.module:962
+msgid "Allow users to customize FCKeditor appearance"
+msgstr ""
+
+#: fckeditor.module:965
+msgid "If allowed, users will be able to override <code>Editor appearance</code> by visiting their profile page."
+msgstr ""
+
+#: fckeditor.module:970
+msgid "Visibility settings"
+msgstr ""
+
+#: fckeditor.module:977
+msgid "Minimum rows"
+msgstr ""
+
+#: fckeditor.module:979
+msgid "FCKeditor will be triggered if the textarea has more rows than entered here. Enter '1' if you do not want to use this feature."
+msgstr ""
+
+#: fckeditor.module:984
+msgid "Use inclusion or exclusion mode"
+msgstr ""
+
+#: fckeditor.module:987
+msgid "Exclude fields, will disable the editor on all selected fields"
+msgstr ""
+
+#: fckeditor.module:988
+msgid "Include fields, will only load the editor for the selected fields"
+msgstr ""
+
+#: fckeditor.module:989
+msgid "Exclude paths, will disable the editor for all textareas at the configured paths"
+msgstr ""
+
+#: fckeditor.module:990
+msgid "Include paths, will load the editor for all large enough textareas at the configured paths."
+msgstr ""
+
+#: fckeditor.module:991
+msgid "Choose what to do with the following values."
+msgstr ""
+
+#: fckeditor.module:1001
+msgid "Selected fields or paths"
+msgstr ""
+
+#: fckeditor.module:1005
+msgid "Enter fieldnames or drupal paths here, depending on the chosen option for the inclusion mode.<br />Names (HTML ID's) of fields that may or may not have an FCKeditor.<br />Paths may be used the same way as in the drupal blocks configuration.<br />You may separate the different entries by commas, spaces or newlines. You may also use * as a wildcard character (for example <code>comment/*</code>).<br />You can not mix paths and ID's."
+msgstr ""
+
+#: fckeditor.module:1010
+msgid "Force simplified toolbar - choose inclusion mode"
+msgstr ""
+
+#: fckeditor.module:1013
+msgid "Include fields, will only load the simplified toolbar for the selected fields"
+msgstr ""
+
+#: fckeditor.module:1014
+msgid "Include paths, will load the simplified toolbar at the configured paths."
+msgstr ""
+
+#: fckeditor.module:1015
+msgid "Choose what to do with the following values.<br/>FCKeditor will force the <code>!simple</code> toolbar on the selected fields.<br/>Useful for smaller textareas where we usually don't use very complicated HTML code, like in signatures."
+msgstr ""
+
+#: fckeditor.module:1025
+msgid "Selected fields or paths where simplified toolbar should appear"
+msgstr ""
+
+#: fckeditor.module:1029
+msgid "If you don't want to use this feature, simply leave this field empty.<br />Enter fieldnames or drupal paths here, depending on the chosen option.<br />Names (HTML ID's) of fields that should have a simplified toolbar.<br />Paths may be used the same way as in the drupal blocks configuration.<br />You may separate the different entries by commas, spaces or newlines. You may also use * as a wildcard character (for example <code>comment/*</code>).<br />You can not mix paths and ID's."
+msgstr ""
+
+#: fckeditor.module:1034
+msgid "Editor appearance"
+msgstr ""
+
+#: fckeditor.module:1044
+msgid "Default editor state. If disabled, rich text editor may still be enabled using toggle or popup window."
+msgstr ""
+
+#: fckeditor.module:1052
+msgid "Whether or not to show the disable/enable rich text editor toggle below the textarea. Works only if FCKeditor is not running in a popup window (see below)."
+msgstr ""
+
+#: fckeditor.module:1068
+msgid "Choose a default skin."
+msgstr ""
+
+#: fckeditor.module:1076
+msgid "Choose a default toolbar set. To define new toolbar, edit <code>fckeditor.config.js</code> located in !module_path."
+msgstr ""
+
+#: fckeditor.module:1124
+msgid "Cleanup and output"
+msgstr ""
+
+#: fckeditor.module:1131
+msgid "Enter mode"
+msgstr ""
+
+#: fckeditor.module:1134
+msgid "Set which tag FCKeditor should use when [Enter] key is pressed."
+msgstr ""
+
+#: fckeditor.module:1139
+msgid "Shift + Enter mode"
+msgstr ""
+
+#: fckeditor.module:1142
+msgid "Set which tag FCKeditor should use when [Shift] + [Enter] is pressed."
+msgstr ""
+
+#: fckeditor.module:1147
+msgid "Font formats"
+msgstr ""
+
+#: fckeditor.module:1151
+msgid "Semicolon separated list of HTML font formats. Allowed values are: p;div;pre;address;h1;h2;h3;h4;h5;h6"
+msgstr ""
+
+#: fckeditor.module:1156
+msgid "Apply source formatting"
+msgstr ""
+
+#: fckeditor.module:1159
+msgid "When set to \"true\" the editor will format the XHTML when switching from WYSIWYG view to Source view, by inserting line breaks on some tags endings and indenting paragraphs, tables and lists."
+msgstr ""
+
+#: fckeditor.module:1164
+msgid "Format output"
+msgstr ""
+
+#: fckeditor.module:1167
+msgid "When set to \"true\" the editor will format the XHTML output by inserting line breaks on some tags endings and indenting paragraphs, tables and lists."
+msgstr ""
+
+#: fckeditor.module:1182
+msgid "CSS"
+msgstr ""
+
+#: fckeditor.module:1189
+msgid "Editor CSS"
+msgstr ""
+
+#: fckeditor.module:1191
+msgid "use theme css"
+msgstr ""
+
+#: fckeditor.module:1191
+msgid "define css"
+msgstr ""
+
+#: fckeditor.module:1191
+msgid "FCKeditor default"
+msgstr ""
+
+#: fckeditor.module:1192
+msgid "Defines the CSS to be used in the editor area.<br />use theme css - load style.css from current site theme.<br/>define css - enter path for css file below.<br />FCKeditor default - uses default CSS from editor."
+msgstr ""
+
+#: fckeditor.module:1197
+msgid "CSS path"
+msgstr ""
+
+#: fckeditor.module:1201
+msgid "Enter path to CSS file (<em>example: \"css/editor.css\"</em>) or a list of css files seperated by a comma (<em>example: /themes/garland/style.css,http://example.com/style.css</em>).<br />Macros: %h (host name: !host), %t (path to theme: !theme)<br />Be sure to select \"define css\" above."
+msgstr ""
+
+#: fckeditor.module:1206
+msgid "CSS classes"
+msgstr ""
+
+#: fckeditor.module:1207
+msgid "Requires manual configuration."
+msgstr ""
+
+#: fckeditor.module:1208
+msgid "Style dropdown list loads styles defined in <code>!fckstyles.xml</code>. Copy this file inside your theme directory (<code>!theme</code>) and adjust it to your needs. If you modify the original file, changes will be applied to all themes, however it may get overwritten if you upgrade FCKeditor."
+msgstr ""
+
+#: fckeditor.module:1215;1224
+msgid "File browser settings"
+msgstr ""
+
+#: fckeditor.module:1218
+msgid "The file browser settings are not diplayed because you have configured IMCE to handle file browsing."
+msgstr ""
+
+#: fckeditor.module:1227
+msgid "Set file browser settings. If you enable file uploads and disable basic and advanced file management, you will need to manage your images and other files with the core upload module or a contrib module like !imce. Please note that these options require manual configuration, check !readme for more information.<br />"
+msgstr ""
+
+#: fckeditor.module:1247
+msgid "Allow basic file management"
+msgstr ""
+
+#: fckeditor.module:1249
+msgid "Allow quick uploads. All files will be placed in the directory designated in the configuration file."
+msgstr ""
+
+#: fckeditor.module:1254
+msgid "Allow advanced file management"
+msgstr ""
+
+#: fckeditor.module:1256
+msgid "Allow file management in the advanced file manager. All files will be placed in subdirectories of the default drupal upload directory."
+msgstr ""
+
+#: fckeditor.info:0
+msgid "Enables the usage of FCKeditor (WYSIWYG) instead of plain text fields."
+msgstr ""
+
diff --git a/po/it.po b/po/it.po
new file mode 100644
index 0000000..ddce231
--- /dev/null
+++ b/po/it.po
@@ -0,0 +1,282 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: FCKEditor\n"
+"POT-Creation-Date: \n"
+"PO-Revision-Date: 2007-09-17 17:50+0100\n"
+"Last-Translator: Michele Cillo <m.cillo@itsspring.com>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"X-Poedit-Language: Italian\n"
+"X-Poedit-Country: ITALY\n"
+
+#: fckeditor.module:21
+#: ;122
+msgid "Enables the usage of FCKeditor (WYSIWYG editor) instead of plain text fields."
+msgstr "Abilita l'utilizzo di FCKeditor (editor WYSIWYG) in luogo dei campi di testo semplice."
+
+#: fckeditor.module:24
+#: ;32
+msgid ""
+"<p>The FCKeditor module allows Drupal to replace textarea fields with a rich text or <acronym title=\"What You See Is What You Get\">WYSIWYG</acronym> editor. This editor brings many of the powerful functionalities of known desktop editors like Word to the web. It's relatively lightweight and doesn't require any kind of installation on the client computer.</p>\n"
+"<p>More information is located at the !fckeditorlink. A small user guide is located at !userguidelink.</p>"
+msgstr ""
+"<p>Il modulo FCKeditor permette a Drupal di sostituire i campi di tipo aree di testo con un editor di testo formattato o editor <acronym title=\"What You See Is What You Get\">WYSIWYG</acronym>. Questo editor porta molte delle potenti funzionalità degli editor per PC come Word sul web. Esso è relativamente leggero e non richiede alcuna installazione sul computer che lo utilizza.</p>\n"
+"<p>Maggiori informazioni si possono reperire a !fckeditorlink. Una sintetica guida utente può essere reperita a !userguidelink.</p>"
+
+#: fckeditor.module:27
+#: ;35;43;49;137
+msgid "FCKeditor homepage"
+msgstr "Pagina home di FCKeditor"
+
+#: fckeditor.module:28
+#: ;36
+msgid "FCKeditor userguide"
+msgstr "Guida utente di FCKeditor"
+
+#: fckeditor.module:38
+msgid ""
+"<h3>Installation</h3>\n"
+"<p>Go to the !fckeditorlink and download the latest version. Then\n"
+"uncompress the contents of the \"fckeditor\" directory of the download file to\n"
+"%fckeditordir.</p>"
+msgstr ""
+"<h3>Installazione</h3>\n"
+"<p>Vai a !fckeditorlink e scarica l'ultima versione. Poi decomprimi il contenuto della cartella \"fckeditor\" directory del file scaricato in \n"
+"%fckeditordir.</p>"
+
+#: fckeditor.module:46
+msgid ""
+"<h3>Installation troubleshooting</h3>\n"
+"<p>If your FCKeditor does not show you must check if all files are extracted correctly. The directory %fckeditordir should have the following files <code>fckeditor.js, fckconfig.js, fckstyles.xml, fcktemplates.xml</code> and a directory named <code>editor</code>.</p>"
+msgstr ""
+"<h3>Problemi di installazione</h3>\n"
+"<p>Se il tuo FCKeditor non viene visualizzato dovresti controllare se tutti i file sono stati estratti correttamente. La cartella %fckeditordir dovrebbe contenere i seguenti file <code>fckeditor.js, fckconfig.js, fckstyles.xml, fcktemplates.xml</code> e una cartella chiamata <code>editor</code>.</p>"
+
+#: fckeditor.module:52
+msgid ""
+"<h3>Configuration</h3>\n"
+"<ol>\n"
+"<li>Modify the fckeditor.config.js file to custom your needs (optional).<br />\n"
+"You may copy the needed configuration lines from the default FCKeditor configuration settings (modules/fckeditor/fckeditor/fckconfig.js), the lines in fckeditor.config.js will override most settings.</li>\n"
+"<li>Enable the module as usual from Drupal's admin pages.</li>\n"
+"<li>Under Administer > Settings > FCKeditor, configure the fckeditor settings. You can choose which textareas will be replaced by FCKeditor, choose the toolbars and configure some more advanced settings.</li>\n"
+"<li>Grant permissions for use of FCKeditor in Administer > User Management > Access Control (You only need to select either basic or advanced editor for each role that is allowed to use the FCKeditor)</li>\n"
+"<li>For the Rich Text Editing to work you also need to configure your !filterlink for the users that may access Rich Text Editing. Either grant those users Full HTML access or use the following: <code>!filter</code>. Users that need access to tables might be better of using Full HTML.</li>\n"
+"</ol>"
+msgstr ""
+"<h3>Configurazione</h3>\n"
+"<ol>\n"
+"<li>Modifica il file fckeditor.config.js per personalizzare le tue necessità (opzionale).<br />\n"
+"Puoi copiare le linee di configurazione che ti servono dalle impostazioni della configurazione predefinita di FCKeditor (modules/fckeditor/fckeditor/fckconfig.js), le linee in in fckeditor.config.js sovrascriveranno la maggior parte delle impostazioni.</li>\n"
+"<li>Abilita il modulo come al solito dalle pagine di amministrazione di Drupal.</li>\n"
+"<li>Sotto Amministrar > Configurazione del sito > FCKeditor, configura le impostazioni per fckeditor.Puoi scegliere quali aree di testo saranno sostituite con FCKeditor, scegliere le barre degli strumenti e configurare alcune impostazioni avanzate.</li>\n"
+"<li>Garantisci i permessi di utilizzo di FCKeditor in Amministra > Utenti > Controllo accessi (devi semplicemente selezionare l'editor di base o avanzato per ciascun ruolo cui è permesso di utilizzare FCKeditor)</li>\n"
+"<li>Per far funzionare la Modifica del Testo Formattato c'è bisogno di configurare anche i tuoi !filterlink per gli utenti che possono accedere alla Modifica del Testo Formattato. O garantisci a quegli utenti l'accesso a Full HTML o utilizza il seguente: <code>!filter</code>. Per gli utenti che hanno bisogno di utilizzare delle tabelle sarebbe meglio l'utilizzo di Full HTML.</li>\n"
+"</ol>"
+
+#: fckeditor.module:63
+msgid "filters"
+msgstr "filtri"
+
+#: fckeditor.module:65
+msgid ""
+"<h3>Uploading images and files</h3>\n"
+"<p>There are three ways of uploading files: By using the built-in file browser, by using a module like !imce or using the core upload module.</p>"
+msgstr ""
+"<h3>Caricamento di immagini e file</h3>\n"
+"<p>Ci sono tre modi di caricare i file: attraverso il file browser integrato, attraverso un modulo come !imce or utilizzando il modulo upload del core.</p>"
+
+#: fckeditor.module:68
+#: ;271
+msgid "IMCE"
+msgstr "IMCE"
+
+#: fckeditor.module:71
+msgid ""
+"<h3>Security</h3>\n"
+"<p>Note that enabling file uploads is <strong>a security risk</strong>. That's why there is a\n"
+"separate permission in Administer > User Management > Access Control for enabling the file\n"
+"browser to certain groups.</p>"
+msgstr ""
+"<h3>Sicurezza</h3>\n"
+"<p>Nota che l'abilitazione del caricamento dei file è <strong>un rischio per la sicurezza</strong>. Questo spiega perchè vi un permesso separato in Amministra > Utenti > Controllo accessi per l'abilitazione del caricamento dei file per specifici gruppi.</p>"
+
+#: fckeditor.module:118
+#: fckeditor.info:0
+msgid "FCKeditor"
+msgstr "FCKeditor"
+
+#: fckeditor.module:133
+msgid "checking for %filename"
+msgstr "Controllo per %filename"
+
+#: fckeditor.module:135
+msgid "The FCKeditor component is not installed correctly. Please go to the !fckeditorlink to download the latest version. After that you must extract the files to %modulepath and make sure that the directory %modulesubdir and the file %modulefile exist. Refer to the !readme for more information."
+msgstr "Il componente FCKeditor non è installato correttamente. Per favore vai a !fckeditorlink per scaricare la versione più recente. Fatto ciò estrai i file in %modulepath ed assicurati che la cartella %modulesubdir e il file %modulefile esistono. Fai riferimento al !readme per maggiori informazioni."
+
+#: fckeditor.module:158
+msgid "Basic settings"
+msgstr "Impostazioni di base"
+
+#: fckeditor.module:164
+msgid "Use FCKeditor in a popup window"
+msgstr "Utilizza FCKeditor in una finestra di popup"
+
+#: fckeditor.module:166
+msgid "If this option is selected a link to a popup window will be used instead of a textarea replace."
+msgstr "Se questa opzione è selezionata sarà mostrato un collegamento ad una finestra di popup con l'editor in luogo della sostituzione delle aree di testo."
+
+#: fckeditor.module:170
+msgid "Default Toolbar"
+msgstr "Barra degli strumenti predefinita"
+
+#: fckeditor.module:173
+msgid "Choose a default toolbar set for users with &quot;use default fckeditor&quot; permission.."
+msgstr "Scegli una barra degli strumenti predefinita per gli utenti con il permesso &quot;utilizza fckeditor predefinito&quot;."
+
+#: fckeditor.module:177
+msgid "Advanced Toolbar"
+msgstr "Barra degli strumenti avanzata"
+
+#: fckeditor.module:180
+msgid "Choose a toolbar set for users with &quot;use advanced fckeditor&quot; permission."
+msgstr "Scegli una barra degli strumenti predefinita per gli utenti con il permesso &quot;utilizza fckeditor avanzato&quot;."
+
+#: fckeditor.module:186
+msgid "Visibility settings"
+msgstr "Impostazioni di visibilità"
+
+#: fckeditor.module:192
+msgid "Minimum rows"
+msgstr "Numero minimo di righe"
+
+#: fckeditor.module:194
+msgid "FCKeditor will be triggered if the textarea has more rows than entered here. Enter '1' if you do not want to use this feature."
+msgstr "FCKeditor sarà avviato se l'area di testo ha più righe di quante specificate qui. Imposta '1' se non vuoi utilizzare questa funzionalità."
+
+#: fckeditor.module:198
+msgid "Use inclusion or exclusion mode"
+msgstr "Usa modalità di inclusione o esclusione"
+
+#: fckeditor.module:201
+msgid "Exclude fields, will disable the editor on all selected fields"
+msgstr "L'esclusione dei campi disabiliterà l'utilizzo dell'editor sui campi selezionati."
+
+#: fckeditor.module:202
+msgid "Include fields, will only load the editor for the selected fields"
+msgstr "L'inclusione dei campi caricherà l'editor solo sui campi selezionati."
+
+#: fckeditor.module:203
+msgid "Exclude paths, will disable the editor for all textareas at the configured paths"
+msgstr "L'esclusione dei percorsi disabiliterà l'editor per tutte le aree di testo dei percorsi configurati."
+
+#: fckeditor.module:204
+msgid "Include paths, will load the editor for all large enough textareas at the configured paths."
+msgstr "L'inclusione dei percorsi caricherà l'editor per le tutte le aree di testo abbastanza larghe che si trovano ai percorsi configurati."
+
+#: fckeditor.module:205
+msgid "Choose what to do with the following values."
+msgstr "Scegli cosa fare per i valori seguenti."
+
+#: fckeditor.module:214
+msgid "Selected fields or paths"
+msgstr "Seleziona dei campi o dei percorsi"
+
+#: fckeditor.module:218
+msgid ""
+"Enter fieldnames or drupal paths here, depending on the chosen option for the inclusion mode.<br />\n"
+"Names (HTML ID's) of fields that may or may not have an FCKeditor.<br />\n"
+"Paths may be used the same way as in the drupal blocks configuration.<br />\n"
+"You may separate the different entries by commas, spaces or newlines. You may also use * as a wildcard character.<br />\n"
+"You can not mix paths and ID's."
+msgstr ""
+"Specifica qui i nomi dei campi o i percorsi drupal, dipendentemente dalla selezione della modalità di inclusione.<br />\n"
+"I nomi (gli ID HTML) dei campi che possono o non possono utilizzare FCKEditor.<br />\n"
+"I percorsi possono essere utilizzati allo stesso modo della configurazione dei blocchi di drupal.<br />\n"
+"Puoi separare i differenti elementi con la virgola, lo spazio o con a capo. Puoi anche utilizzare * come carattere jolly.<br />\n"
+"Non puoi mischiare ID e percorsi."
+
+#: fckeditor.module:228
+msgid "Advanced settings"
+msgstr "Impostazioni avanzate"
+
+#: fckeditor.module:234
+msgid "Start the toolbar expanded"
+msgstr "Avvia la barra degli strumenti espansa"
+
+#: fckeditor.module:236
+msgid "The toolbar start expanded or collapsed."
+msgstr "La barra degli strumenti viene avviata espansa o collassata."
+
+#: fckeditor.module:240
+msgid "Width"
+msgstr "Larghezza"
+
+#: fckeditor.module:242
+msgid "Width in pixels or percent. Ex: 400 or 100%"
+msgstr "Larcghezza in pixel o percentuale. Es: 400 o 100%"
+
+#: fckeditor.module:246
+msgid "Custom stylesheet"
+msgstr "Foglio di stile personalizzato"
+
+#: fckeditor.module:248
+msgid "If you enter a path to a stylesheet here it will be used in the FCKeditor area while editing. Be advised that using the default theme stylesheet will not give the correct results."
+msgstr "Se imposti qui un percorso di un foglio di stile, questo sarà utilizzato durante la modifica all'interno di FCKeditor. Attenzione che l'utilizzo del foglio di stile predefinito del tema non darà il risultato corretto."
+
+#: fckeditor.module:256
+#: ;266
+msgid "File browser settings"
+msgstr "Impostazioni del File browser"
+
+#: fckeditor.module:259
+msgid "The file browser settings are not diplayed because you have configured IMCE to handle file browsing."
+msgstr "Le impostazioni sul browser dei file non sono mostrate poichè hai configurato IMCE per la gestione del trasferimento dei file."
+
+#: fckeditor.module:269
+msgid "Set file browser settings. If you choose none of these you will need to manage your images and other files with the core upload module or a contrib module like !imce. Please note that these options require manual configuration, check !readme for more information.<br />Also remember to change the !permissions."
+msgstr "Specifica le impostazioni del browser di file. Se scegli nessuno di queste dovrai gestire le tue immagini e gli altri file con il modulo upload del core o con un modulo addizionale come !imce. Per favore nota che queste opzioni richiedono una configurazione manuale, verifica il !readme per maggiori informazioni.<br/>Ricorda anche di cambiare i !permissions."
+
+#: fckeditor.module:280
+msgid "Allow basic file management"
+msgstr "Permette una gestione dei file di base"
+
+#: fckeditor.module:282
+msgid "Allow quick uploads. All files will be placed in the directory designated in the configuration file."
+msgstr "Permetti caricamenti veloci. Tutti i file saranno posti nella cartella specificata nel file di configurazione."
+
+#: fckeditor.module:286
+msgid "Allow advanced file management"
+msgstr "Permette una gestione dei file avanzata"
+
+#: fckeditor.module:288
+msgid "Allow file management in the advanced file manager. All files will be placed in subdirectories of the default drupal upload directory."
+msgstr "Permetti la gestione dei file tramite il gestore avanzato dei file. Tutti i file saranno posti in sottocartelle della cartella di caricamento predefinita di drupal."
+
+#: fckeditor.module:438
+msgid "Open rich editor"
+msgstr "Apri editor di testo formattato"
+
+#: fckeditor.module:91
+msgid "use default fckeditor"
+msgstr "utilizza fckeditor predefinito"
+
+#: fckeditor.module:91
+msgid "use advanced fckeditor"
+msgstr "utilizza fckeditor avanzato"
+
+#: fckeditor.module:91
+msgid "allow fckeditor file uploads"
+msgstr "permette il caricamento dei file tramite fckeditor"
+
+#: fckeditor.module:0
+msgid "fckeditor"
+msgstr "fckeditor"
+
+#: fckeditor.info:0
+msgid "Enables the usage of FCKeditor (WYSIWYG) instead of plain text fields."
+msgstr "Abilita l'utilizzo di FCKeditor (WYSIWYG) in luogo dei campi testo semplice."
+
diff --git a/po/nl.po b/po/nl.po
new file mode 100644
index 0000000..78244c7
--- /dev/null
+++ b/po/nl.po
@@ -0,0 +1,202 @@
+# $Id$
+#
+# LANGUAGE translation of Drupal (fckeditor.module)
+# Copyright YEAR NAME <EMAIL@ADDRESS>
+# Generated from files:
+# fckeditor.module,v 1.19.2.1 2006/11/21 09:18:15 ontwerpwerk
+# fckeditor.info,v 1.1 2006/11/13 19:21:39 ontwerpwerk
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PROJECT VERSION\n"
+"POT-Creation-Date: 2007-01-07 02:17+0100\n"
+"PO-Revision-Date: 2007-01-07 02:39+0100\n"
+"Last-Translator: Frank Van Geirt <fvangeirt@gmail.com>\n"
+"Language-Team: LANGUAGE <EMAIL@ADDRESS>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
+
+#: fckeditor.module:41;102
+msgid ""
+"Enables the usage of FCKeditor (WYSIWYG editor) instead of plain"
+"text fields."
+msgstr ""
+"Laat het gebruik van FCKeditor (WYSIWYG editor) toe in plaats van"
+"de eenvoudige tekstvelden."
+
+#: fckeditor.module:44;49
+msgid ""
+"<p>The FCKeditor module allows Drupal to replace textarea fields with a"
+"rich text or <acronym title=\"What You See Is What You"
+"Get\">WYSIWYG</acronym> editor. This editor brings many of the powerful"
+"functionalities of known desktop editors like Word to the web. It's"
+"relatively lightweight and doesn't require any kind of installation on the"
+"client computer.</p>\n"
+"<p>More information is located at the !fckeditorlink. A small user guide"
+"is located at !userguidelink.</p>"
+msgstr ""
+"<p>De FCKeditor module laat toe om in Drupal de tekstvelden te vervangen"
+"door rich text of een <acronym title=\"What You See Is What You"
+"Get\">WYSIWYG</acronym> editor. Deze editor brengt veel van de functies van"
+"bekende desktop editors zoals Word op het web. Het is relatief licht en"
+"vraagt geen enkele installatie op de lokale computer.</p>\n"
+"<p>Meer informatie is te vinden op !fckeditorlink. Een kleine handleiding"
+"i te vinden op !userguidelink.</p>"
+
+#: fckeditor.module:45;50
+msgid "FCKeditor homepage"
+msgstr "FCKeditor home pagina"
+
+#: fckeditor.module:45;50
+msgid "FCKeditor userguide"
+msgstr "FCKeditor handleiding"
+
+#: fckeditor.module:51
+msgid ""
+"<h3>Configuration</h3>\n"
+"<p>For the Rich Text Editing to work you also need to configure your"
+"!filterlink for the users that may access Rich Text Editing. Either grant"
+"those users Full HTML access or use the following: <code>!filter</code>."
+"Users that need access to tables might be better of using Full HTML.</p>"
+msgstr ""
+"<h3>Configuratie</h3>\n"
+"<p>Om gebruik te kunnen maken van de Rich Text Editing moet je eveneens"
+"de !filterlink voor uw gebruikers configureren zodat ze de vereiste toegang"
+"krijgen. Geef deze gebruikers ofwel de Full HTML toegang of gebruik de"
+"volgende: <code>!filter</code>. Gebruikers die toegang tot tabellen nodig"
+"hebben, gebruiken beter Full HTML.</p>"
+
+#: fckeditor.module:52
+msgid "filters"
+msgstr "filters"
+
+#: fckeditor.module:53
+msgid ""
+"<h3>Security</h3>\n"
+"<p>Note that enabling file uploads is a security risk, please take care"
+"about to who and when you will grant access.</p>"
+msgstr ""
+"<h3>Veiligheid</h3>\n"
+"<p>Weet dat het toelaten van bestanden opladen een gevaar kan zijn. Let"
+"op wie en wanneer je deze toegang geeft.</p>"
+
+#: fckeditor.module:98
+#: fckeditor.info:0
+msgid "FCKeditor"
+msgstr "FCKeditor"
+
+#: fckeditor.module:121
+msgid "Basic settings"
+msgstr "Basis instellingen"
+
+#: fckeditor.module:127
+msgid "Use FCKeditor in a popup window"
+msgstr "Gebruik FCKeditor in een popup venster"
+
+#: fckeditor.module:129
+msgid ""
+"If this option is selected a link to a popup window will be used"
+"instead of a textarea replace."
+msgstr "Indien deze optie geselecteerd wordt, wordt een popup venster gebruikt in plaats van het tekst veld."
+
+#: fckeditor.module:133
+msgid "Default Toolbar"
+msgstr "Standaard knoppenbalk"
+
+#: fckeditor.module:136
+msgid "Choose a default toolbar set."
+msgstr "Kies een standaard knoppenbalk."
+
+#: fckeditor.module:140
+msgid "Advanced Toolbar"
+msgstr "Geavanceerde knoppenbalk."
+
+#: fckeditor.module:143
+msgid "Choose a toolbar set for administrators."
+msgstr "Kies een knoppenbalk voor beheerders."
+
+#: fckeditor.module:149
+msgid "Exclusion settings"
+msgstr "Uitsluiting instellingen"
+
+#: fckeditor.module:155
+msgid "Minimum rows"
+msgstr "Minimum rijen"
+
+#: fckeditor.module:157
+msgid ""
+"Textareas must have a minimum of rows before FCKeditor will be"
+"triggered. Enter '1' if you do not want to use this feature."
+msgstr ""
+"Tekstvelden moeten een minimum aantal rijen hebben vooraleer"
+"FCKeditor wordt geactiveerd. Geef '1' in indien je deze functie niet wenst"
+"te gebruiken."
+
+#: fckeditor.module:166
+msgid "Exclude fields"
+msgstr "Sluit velden uit"
+
+#: fckeditor.module:170
+msgid ""
+"Names (HTML ID's) of fields that may not have an FCKeditor"
+"(separated by commas, spaces or newlines. You may also use * for a"
+"wildcard)"
+msgstr ""
+"Namen (HTML ID's) van velden die geen FCKeditor mogen hebben. De"
+"namen moeten worden gescheiden met komma's, spaties of nieuwe regels. Het"
+"gebruik van * voor jokers is toegelaten."
+
+#: fckeditor.module:176
+msgid "Advanced settings"
+msgstr "Geavanceerde instellingen"
+
+#: fckeditor.module:182
+msgid "Start the toolbar expanded"
+msgstr "Start met de knoppenbalk uitgeschoven"
+
+#: fckeditor.module:184
+msgid "The toolbar start expanded or collapsed."
+msgstr "De knoppenbalk start uitgeschoven of dichtgeklapt."
+
+#: fckeditor.module:188
+msgid "Width"
+msgstr "Breedte"
+
+#: fckeditor.module:190
+msgid "Width in pixels or percent. Ex: 400 or 100%"
+msgstr "Breedte in pixels of percentage. B.v. 400 of 100%"
+
+#: fckeditor.module:268
+msgid "Open rich editor"
+msgstr "Open rich text editor"
+
+#: fckeditor.module:71
+msgid "use default fckeditor"
+msgstr "gebruik standaard dcfeditor"
+
+#: fckeditor.module:71
+msgid "use advanced fckeditor"
+msgstr "gebruik geavanceerde fckeditor"
+
+#: fckeditor.module:71
+msgid "allow fckeditor file uploads"
+msgstr "laat fckeditortoe bestanden opladen"
+
+#: fckeditor.module:0
+msgid "fckeditor"
+msgstr "fckeditor"
+
+#: fckeditor.info:0
+msgid ""
+"Enables the usage of FCKeditor (WYSIWYG) instead of plain text"
+"fields."
+msgstr ""
+"Laat het gebruik van FCKeditor (WYSIWYG editor) toe in plaats van"
+"de eenvoudige tekstvelden."
+
+#: fckeditor.info:0
+msgid "Input helpers"
+msgstr "Invoer hulp"
+
diff --git a/po/pl.po b/po/pl.po
new file mode 100644
index 0000000..55e3010
--- /dev/null
+++ b/po/pl.po
@@ -0,0 +1,553 @@
+# $Id$
+#
+# LANGUAGE translation of Drupal (general)
+# Copyright YEAR NAME <EMAIL@ADDRESS>
+# No version information was available in the source files.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: \n"
+"POT-Creation-Date: 2007-10-30 09:59+0100\n"
+"PO-Revision-Date: 2007-10-30 10:44+0100\n"
+"Last-Translator: Wiktor Walc <w.walc@fckeditor.net>\n"
+"Language-Team: FCKeditor <EMAIL@ADDRESS>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: Plural-Forms: nplurals=2; plural=(n != 1);\\n\n"
+"X-Poedit-Language: Polish\n"
+"X-Poedit-Country: POLAND\n"
+
+#: fckeditor.module:45
+msgid "Enables the usage of FCKeditor (WYSIWYG editor) instead of plain text fields."
+msgstr "Zastąp zwykłe pola tekstowe wizualnym edytorem HTML (WYSIWYG) - FCKeditorem."
+
+#: fckeditor.module:48
+msgid "<p>Note: FCKeditor is highly configurable. The most commonly used features are listed below. If you want to take a look at all available settings, open <code>!fckconfig</code> and then customize <code>!fckeditor_config</code> to your needs. This is also the only way to define new toolbar sets. It is advised to not edit <code>fckconfig.js</code> because you may overwrite it accidentally when you update the editor.</p>"
+msgstr "<p>Uwaga: FCKeditor posiada wiele opcji konfiguracyjnych. Najczęściej używane zostały przedstawione poniżej. Jeśli chcesz poznać wszystkie możliwe opcje konfiguracyjne, otwórz <code>!fckconfig</code> i następnie dostosuj w analogiczny sposób do swoich potrzeb plik <code>!fckeditor_config</code>. Jest to również jedyny sposób na zdefiniowanie nowego paska narzędzi (toolbar). Nie jest zalecana edycja pliku <code>fckconfig.js</code>, ponieważ w przyszłości możesz go niechcący nadpisać podczas uaktualnienia FCKEditora.</p>"
+
+#: fckeditor.module:51;59
+msgid "<p>The FCKeditor module allows Drupal to replace textarea fields with a rich text or <acronym title=\"What You See Is What You Get\">WYSIWYG</acronym> editor. This editor brings many of the powerful functionalities of known desktop editors like Word to the web. It's relatively lightweight and doesn't require any kind of installation on the client computer.</p><p>More information is located at the !fckeditorlink. A small user guide is located at !userguidelink.</p>"
+msgstr "<p>Moduł FCKeditor pozwala na zastąpienie pól tekstowych w Drupalu rozbudowanym edytorem <acronym title=\"What You See Is What You Get\">WYSIWYG</acronym>. Edytor ten udostępnia użytkownikowi mnóstwo możliwości i jest równie prosty w użyciu dla użytkownika jak Word. FCKeditor nie jest przeładowany niepotrzebnymi gadżetami i nie wymaga żadnej dodatkowej instalacji na komputerze klienta.</p><p>Więcej informacji możesz znaleźć tutaj: !fckeditorlink. Krótki przewodnik dla użytkownika można znaleźć tutaj: !userguidelink.</p>"
+
+#: fckeditor.module:53;61;66;71
+msgid "FCKeditor homepage"
+msgstr "Strona główna FCKeditor.net"
+
+#: fckeditor.module:54;62
+msgid "FCKeditor userguide"
+msgstr "Przewodnik po FCKeditorze"
+
+#: fckeditor.module:56
+msgid "<p>Profiles can be defined based on user roles. A FCKeditor profile can define which pages receive this FCKeditor capability, what buttons or themes are enabled for the editor, how the editor is displayed, and a few other editor functions.</p><p>Lastly, only users with the <code>!access1</code> <a href=\"!url\">permission</a> will be able to use FCKeditor.</p>"
+msgstr "<p>Konfiguracja FCKeditora opiera się na podziale na profile. Poszczególny profil przypisywany jest do roli (rangi). W każdym profilu można zdefiniować w jakich konkretnie miejscach i w jaki sposób ma się pojawiać FCKeditor, jaki pasek narzędzi ma być dostępny, wybrać skórkę itd.</p><p>Tylko użytkownicy z <a href=\"!url\">uprawnieniami</a> <code>!access1</code> będą mogli uzywać FCKeditora.</p>"
+
+#: fckeditor.module:56;919;956
+msgid "access fckeditor"
+msgstr "dostęp do FCKeditora"
+
+#: fckeditor.module:64
+msgid "<h3>Installation</h3><p>Go to the !fckeditorlink and download the latest version. Then uncompress the contents of the \"fckeditor\" directory of the downloaded file to %fckeditordir.</p>"
+msgstr "<h3>Instalacja</h3><p>Przejdź do !fckeditorlink i pobierz najnowszą wersję FCKeditora. Następnie wypakuj zawartość pliku, czyli katalog \"fckeditor\" do katalogu %fckeditordir.</p>"
+
+#: fckeditor.module:69
+msgid "<h3>Installation troubleshooting</h3><p>If your FCKeditor does not show you must check if all files are extracted correctly. The directory %fckeditordir should have the following files <code>fckeditor.js, fckconfig.js, fckstyles.xml, fcktemplates.xml</code> and a directory named <code>editor</code>.</p>"
+msgstr "<h3>Kłopoty z instalacją</h3><p>Jeśli FCKeditor się nie pojawia, upewnij się, że wszystkie pliki rozpakowane zostały prawidłowo. Katalog %fckeditordir powinien zawierać między innymi następujące pliki: <code>fckeditor.js, fckconfig.js, fckstyles.xml, fcktemplates.xml</code> oraz katalog o nazwie <code>editor</code>.</p>"
+
+#: fckeditor.module:74
+msgid "The correct directory structure is as follows: <pre>!structure</pre>"
+msgstr "Poprawna struktura katalogów jest następująca: <pre>!structure</pre>"
+
+#: fckeditor.module:77
+msgid "<h3>Configuration</h3><ol><li>Modify the fckeditor.config.js file to custom your needs (optional).<br />You may copy the needed configuration lines from the default FCKeditor configuration settings (modules/fckeditor/fckeditor/fckconfig.js), the lines in fckeditor.config.js will override most settings.</li><li>Enable the module as usual from Drupal's admin pages.</li><li>Grant permissions for use of FCKeditor in <code>!path2</code></li><li>Under <code>!path1</code>, create the fckeditor profiles. In each profile you can choose which textareas will be replaced by FCKeditor, select default toolbar and configure some more advanced settings </li><li>For the Rich Text Editing to work you also need to configure your !filterlink for the users that may access Rich Text Editing. Either grant those users Full HTML access or use the following: <br/><code>!filter</code>. </li><li>To have a better control over line breaks, you may disable <code>Line break converter</code> in the chosen filter.</li></ol>"
+msgstr "<h3>Konfiguracja</h3><ol><li>Zmodyfikuj plik fckeditor.config.js do swoich potrzeb (opcjonalnie).<br />Możesz skopiować poszczególne linie z domyślnej konfiguracji FCKeditora (modules/fckeditor/fckeditor/fckconfig.js), ustawienia w fckeditor.config.js nadpiszą ustawienia z oryginanego pliku.</li><li>Włącz moduł (tak jak każdy inny moduł) w sekcji administracyjnej Drupala.</li><li>Nadaj uprawnienia użytkowania FCKeditora w <code>!path2</code></li><li>W sekcji <code>!path1</code>, utwórz profile dla FCKeditora. W każdym profilu, możesz szczegółowo ustawić, gdzie pola tekstowe zostaną zastąpione przez FCKeditora, wybrać domyślny pasek narzędzi i skonfigurować wiele innych opcji </li><li>Na potrzeby edytora WYSIWYG, powinieneś również dostosować opcje filtrowania tagów HTML !filterlink. Udostępnij im możliwość edycji pełnego HTML (niezbyt bezpieczne) lub użyj poniższych tagów: <br/><code>!filter</code>. </li><li>Aby mieć lepszą kontrolę nad znakami nowej linii podczas edycji, wyłączenie <code>Konwertera znaków końca linii</code> w wybranym filtrze może okazać się pomocne.</li></ol>"
+
+#: fckeditor.module:79
+msgid "Administer > Settings > FCKeditor"
+msgstr "Zarządzaj › Konfiguracja witryny > FCKeditor"
+
+#: fckeditor.module:80
+msgid "Administer > User Management > Access Control"
+msgstr "Strona główna › Zarządzaj › Zarządzanie użytkownikami"
+
+#: fckeditor.module:85
+msgid "filters"
+msgstr "filtry"
+
+#: fckeditor.module:87
+msgid "<h3>Plugins: Teaser break and Pagebreak</h3><p>By default, FCKeditor module comes with two plugins that can handle teaser break (&lt;!--break--&gt;) and pagebreak (&lt;!--pagebreak--&gt;). You can enable any (or even both) of them.<ol><li>Open <code>!fckeditor.config.js</code> and uncomment these three lines: <pre>!code</pre></li><li>The second step is to add buttons to the toolbar (in the same file). The button names are: <code>DrupalBreak, DrupalPageBreak</code>. For example if you have a toolbar with an array of buttons defined as follows: <pre>!buttons1</pre> simply add those two buttons at the end of array: <pre>!buttons2</pre> (remember about single quotes).</li></ol></p>"
+msgstr "<h3>Wtyczki: Teaser break i Pagebreak</h3><p>Moduł FCKeditor domyślnie posiada dwie wtyczki, które obsługują tagi &lt;!--break--&gt; i &lt;!--pagebreak--&gt;.Możesz włączyć każdą z nich (albo obie jednocześnie).<ol><li>Otwórz <code>!fckeditor.config.js</code> i odkomentuj trzy linie:<pre>!code</pre></li><li>Drugi krok polega na dodaniu dwóch guzików do paska narzędzi (w tym samym pliku).Nazwy guzików to: <code>DrupalBreak, DrupalPageBreak</code>. Przykładowo, mając tablicę guzików zdefiniowaną w następujący sposób: <pre>!buttons1</pre> dodajemy sobie dwa guziki na koniec tablicy: <pre>!buttons2</pre> (pamiętaj o znakach cudzysłowia).</li></ol></p>"
+
+#: fckeditor.module:98
+msgid "<h3>Uploading images and files</h3><p>There are three ways of uploading files: By using the built-in file browser, by using a module like !imce or using the core upload module.</p>"
+msgstr "<h3>Uploadowanie plików i obrazków</h3><p>Są trzy sposoby, w jaki można uplodować plik: używając wbudowanego menadżera plików, używając moduł taki jak !imce lub używając wbudowanego modułu w Drupalu.</p>"
+
+#: fckeditor.module:100;1229
+msgid "IMCE"
+msgstr "IMCE"
+
+#: fckeditor.module:103
+msgid "<h3>Security</h3><p>Note that enabling file uploads is <strong>a security risk</strong>. That's why there is a !link in Administer > User Management > Access Control for enabling the file browser to certain groups.</p>"
+msgstr "<h3>Bezpieczeństwo</h3><p>Uwaga: włączenie opcji uploadowania plików zawsze obarczone jest <strong>potencjalnym ryzykiem</strong>. Z tego powodu dostępne jest !link do udostępnienia przeglądarki plików.</p>"
+
+#: fckeditor.module:103
+msgid "separate permission"
+msgstr "oddzielne uprawnienie"
+
+#: fckeditor.module:105
+msgid "<h3>How to enable the file browser</h3><p>The editor gives the end user the flexibility to create a custom file browser that can be integrated on it. The included file browser allows users to view the content of a specific directory on the server and add new content to that directory (create folders and upload files).</p><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>!config1</code><br/> and <br/><code>!config2</code> <br/> (FCKeditor 2.3.x - 2.4.x)<br/><br/> or <code>!config3</code> <br/> (FCKeditor 2.5+) </p><p>In this file you will need to enable the file browser:<br /><code>&#36;Config['Enabled'] = true;</code></p><p>To use the drupal files directory you also need to adjust the following variables in the connector configuration:<br/><code>&#36;Config['UserFilesPath']</code> and <code>&#36;Config['UserFilesAbsolutePath']</code>.<br/>Point <code>&#36;Config['UserFilesPath']</code> to the path to drupal &quot;files&quot; directory and set <code>&#36;Config['UserFilesAbsolutePath']</code> to the absolute path to the same directory.</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 ('!filesdir'). These directories must have the same privileges as the drupal files directory. In some cases these directories must be world writable (chmod 0777).</p>"
+msgstr "<h3>Konfiguracja przeglądarki plików</h3><p>Edytor udostępnia Ci spore możliwości w zakresie podłączenia menadżera plików. Wbudowana w FCKeditor przeglądarka plików umożliwia uzytkownikom przegladanie zawartości wybranego katalogu oraz zmiany zawartości tego katalogu (tworzenie folderów, uploadowanie plików).</p><p>Aby włączyć przeglądarkę plików, musisz przeedytować pliki konfiguracyjne w katalogu fckeditora. Potrzebne pliki znajduj się w katalogach:<br /><code>!config1</code><br/> and <br/><code>!config2</code> <br/> (FCKeditor 2.3.x - 2.4.x)<br/><br/> lub <code>!config3</code> <br/> (FCKeditor 2.5+) </p><p>W powyższych plikach, musisz włączyć przeglądarkę plików:<br /><code>&#36;Config['Enabled'] = true;</code></p><p>Aby używać domyślnego katalogu Drupala do uploadowania plików, musisz również dostosować powyższe zmienne:<br/> <code>&#36;Config['UserFilesPath']</code> i <code>&#36;Config['UserFilesAbsolutePath']</code> (ścieżka absolutna do katalogu z plikami).<br/>Skieruj <code>&#36;Config['UserFilesPath']</code> na ścieżkę do katalogu Drupala &quot;files&quot; (tam gdzie domyślnie trzymane są pliki) oraz ustaw zmienną <code>&#36;Config['UserFilesAbsolutePath']</code> na absolutną ścieżkę do tego samego katalogu.</p><p>W dalszej kolejności, utwórz cztery podkatalogi: <em>'File'</em>, <em>'Image'</em>, <em>'Flash'</em> and <em>'Media'</em> wewnątrz katalogu 'files' ('!filesdir'). Powyższe katalogi muszą mieć takie same uprawnienia jak domyślny katalog 'files' Drupala. W pewnych wypadkach, katalogi te muszą mieć uprawnienia ustawione na 777 (chmod 0777).</p>"
+
+#: fckeditor.module:112
+msgid "<h3>Making File Browser more secure</h3><p>Please be aware that enabling file browser simply by setting <code>&#36;Config['Enabled'] = true;</code> theoretically enables it for each user (with a little bit of hackery, it is possible to use file browser without appropiate Drupal permissions). The more secure way of enabling file browser is as follows:</p><ol><li>Instead of setting <br/> <code>&#36;Config['Enabled'] = true ;</code><br/> add the following code: <pre>!snippet</pre> straight after <code>&#36;Config['Enabled'] = false ;</code><br/>This code enables file browser only to users that have <a href="!url">!access1</a> permission.<br/>Note: if you don't set <code>&#36;drupal_path</code> correctly, FCKeditor will find it out by itself.</li><li>As of Drupal 5.2, additional step is required: <br/> locate file named <code>settings.php</code> inside your drupal directory (usually <code>sites/default/settings.php</code>) and set <code>&#36;cookie_domain</code> variable to the appropiate domain (remember to uncomment that line).</li></ol>"
+msgstr "<h3>Zabezpieczanie przeglądarki plików</h3><p>Uwaga: prezentowany powyżej sposób włączenia przeglądarki plików poprzez: <code>&#36;Config['Enabled'] = true;</code> nie jest w 100% bezpieczny (przy odrobinie hackowania, można uruchomić przeglądarkę nie posiadając odpowiednich uprawnień). W pełni bezpieczna procedura uruchomienia menadżera plików jest następująca:</p><ol><li>Zamiast dodawać <br/> <code>&#36;Config['Enabled'] = true ;</code><br/> dodaj następujący kod: <pre>!snippet</pre> zaraz po <code>&#36;Config['Enabled'] = false ;</code><br/>Kod ten umożliwa skorzystanie z przeglądarki jedynie przez uprawnionych do tego użytkowników - posiadających uprawnienie <a href="!url">!access1</a>.<br/>Zwróć uwagę, że jeśli nie ustawisz poprawnie zmiennej <code>&#36;drupal_path</code>, FCKeditor odnajdzie ją sam.</li><li>Począwszy od Drupala w wersji 5.2, należy wykonać dodatkowy krok: <br/> odszukaj plik o nazwie <code>settings.php</code> wewnątrz katalogu, do którego zainstalowałeś Drupala (zazwyczaj <code>sites/default/settings.php</code>) i ustaw zmienną <code>&#36;cookie_domain</code> na odpowiednią nazwę domeny.(pamiętaj również aby odkomentować tę linię) </li></ol>"
+
+#: fckeditor.module:136
+msgid "allow fckeditor file uploads"
+msgstr "dostęp do uploadowania plików w FCKeditorze"
+
+#: fckeditor.module:149
+msgid "administer fckeditor"
+msgstr "administracja FCKeditorem"
+
+#: fckeditor.module:200
+#: fckeditor.info:0
+msgid "FCKeditor"
+msgstr "FCKeditor"
+
+#: fckeditor.module:202
+msgid "Configure the rich editor."
+msgstr "Konfiguracja wizualnego edytora HTML."
+
+#: fckeditor.module:223
+msgid "You must give a profile name."
+msgstr "Wpisz nazwę profilu."
+
+#: fckeditor.module:227
+msgid "You must select at least one role."
+msgstr "Wybierz przynajmniej jedną rolę."
+
+#: fckeditor.module:250
+msgid "administer"
+msgstr "administruj"
+
+#: fckeditor.module:251
+msgid "fckeditor"
+msgstr "fckeditor"
+
+#: fckeditor.module:252
+msgid "Add new FCKeditor profile"
+msgstr "Dodaj nowy profil"
+
+#: fckeditor.module:258
+msgid "Edit FCKeditor profile"
+msgstr "Edytuj profil"
+
+#: fckeditor.module:264
+msgid "Deleted profile"
+msgstr "Profil usunięty"
+
+#: fckeditor.module:268;927
+msgid "Create profile"
+msgstr "Utwórz profil"
+
+#: fckeditor.module:269;931
+msgid "Update profile"
+msgstr "Uaktualnij profil"
+
+#: fckeditor.module:272
+msgid "Your FCKeditor profile has been updated."
+msgstr "FCKeditor: profil uaktualniony."
+
+#: fckeditor.module:272
+msgid "Your FCKeditor profile has been created."
+msgstr "FCKeditor: profil utworzony."
+
+#: fckeditor.module:281
+msgid "FCKeditor settings"
+msgstr "FCKeditor - ustawienia"
+
+#: fckeditor.module:285
+msgid "Could not find the FCKeditor engine installed at <strong>!fckeditor-directory</strong>. Please <a href=\"http://www.fckeditor.net/download\">download FCKeditor</a>, uncompress it and copy the folder into !fckeditor-path."
+msgstr "FCKeditor nie jest najprawdopodobniej poprawnie zainstalowany, nie odnalazłem fckeditora w katalogu <strong>!fckeditor-directory</strong>. <a href=\"http://www.fckeditor.net/download\">Pobierz FCKeditora</a> i skopiuj go do folderu !fckeditor-path."
+
+#: fckeditor.module:321
+msgid "Profile"
+msgstr "Profil"
+
+#: fckeditor.module:321
+msgid "Roles"
+msgstr "Role"
+
+#: fckeditor.module:321
+msgid "Operations"
+msgstr "Operacje"
+
+#: fckeditor.module:323
+msgid "edit"
+msgstr "edytuj"
+
+#: fckeditor.module:323
+msgid "delete"
+msgstr "usuń"
+
+#: fckeditor.module:326
+msgid "<p><a href=\"!create-profile-url\">Create new profile</a></p>"
+msgstr "<p><a href=\"!create-profile-url\">Utwórz nowy profil</a></p>"
+
+#: fckeditor.module:329
+msgid "No profiles found. Click here to <a href=\"!create-profile-url\">create a new profile</a>."
+msgstr "Nie znaleziono żadnego profilu. <a href=\"!create-profile-url\">Utwórz nowy profil</a>."
+
+#: fckeditor.module:457;458
+msgid "Switch to plain text editor"
+msgstr "Przełącz na edytor tekstowy"
+
+#: fckeditor.module:457;458
+msgid "Switch to rich text editor"
+msgstr "Przełącz na edytor WYSIWYG"
+
+#: fckeditor.module:599
+msgid "Open rich editor"
+msgstr "Otwórz zaawansowany edytor tekstu"
+
+#: fckeditor.module:632
+msgid "Rich Text Editor settings"
+msgstr "Ustawienia zaawansowanego edytora tekstu"
+
+#: fckeditor.module:640;1041
+msgid "Default state"
+msgstr "Domyślne ustawienie"
+
+#: fckeditor.module:642;682;1043;1083
+msgid "enabled"
+msgstr "włączony"
+
+#: fckeditor.module:642;682;1043;1083
+msgid "disabled"
+msgstr "wyłączony"
+
+#: fckeditor.module:643
+msgid "Should rich-text editing be enabled or disabled by default in textarea fields? If disabled, rich text editor may still be enabled using toggle or popup window."
+msgstr "Czy FCKeditor powinien być domyślnie włączony/wyłączony w polach tekstowych? Jeśli wybierzesz wyłączony, edytora nadal będziesz mógł użyć przy pomocy przełącznika (linku) lub poprzez okienko popup."
+
+#: fckeditor.module:648;1049
+msgid "Show disable/enable rich text editor toggle"
+msgstr "Pokaż link do włączenia/wyłączenia edytora"
+
+#: fckeditor.module:650;658;707;964;1051;1059;1108;1246;1253
+msgid "true"
+msgstr "tak"
+
+#: fckeditor.module:650;658;707;964;1051;1059;1108;1246;1253
+msgid "false"
+msgstr "nie"
+
+#: fckeditor.module:651
+msgid "Whether or not to show the disable/enable rich text editor toggle below the textarea. Works only if FCKeditor is not running a popup window (see below)."
+msgstr "Wybierz czy pokazywać link do włączenia/wyłączenia edytora tuż poniżej pola textarea. Zadziała tylko wówczas, gdy nie wybieresz opcji uruchamiania FCKeditora w trybie popup."
+
+#: fckeditor.module:656;1057
+msgid "Use FCKeditor in a popup window"
+msgstr "Użyj FCKeditora w trybie okienka popup"
+
+#: fckeditor.module:659;1060
+msgid "If this option is enabled a link to a popup window will be used instead of a textarea replace."
+msgstr "Jeśli wybierzesz tę opcję, link do okienka popup zostanie wyświetlony zamiast zastąpienia pola tekstowego edytorem WYSIWYG."
+
+#: fckeditor.module:664;1065
+msgid "Skin"
+msgstr "Skórka"
+
+#: fckeditor.module:667
+msgid "Choose a FCKeditor skin."
+msgstr "Wybierz skórkę dla FCKeditora"
+
+#: fckeditor.module:672;1073
+msgid "Toolbar"
+msgstr "Pasek narzędzi"
+
+#: fckeditor.module:675
+msgid "Choose a FCKeditor toolbar set."
+msgstr "Wybierz pasek narzędzi"
+
+#: fckeditor.module:680;1081
+msgid "Start the toolbar expanded"
+msgstr "Rozpocznij z rozwiniętym paskiem narzędzi"
+
+#: fckeditor.module:683;1084
+msgid "The toolbar start expanded or collapsed."
+msgstr "Wybierz w jaki sposób ma się pojawiać początkowo pasek narzędzi (rozwinięty lub zwinięty)"
+
+#: fckeditor.module:688;1089
+msgid "Width"
+msgstr "Szerokość"
+
+#: fckeditor.module:690;1091
+msgid "Width in pixels or percent. Ex: 400 or 100%"
+msgstr "Szerokość w pikselach lub procentach. Przykład: 400 lub 100%"
+
+#: fckeditor.module:697;1098
+msgid "Language"
+msgstr "Domyślny język"
+
+#: fckeditor.module:700;1101
+msgid "The language for the FCKeditor interface."
+msgstr "Język interfejsu użytkownia"
+
+#: fckeditor.module:705;1106
+msgid "Auto-detect language"
+msgstr "Auto detekcja języka"
+
+#: fckeditor.module:708;1109
+msgid "Use auto detect user language feature."
+msgstr "Użyj funkcji auto detekcji języka użytkownika"
+
+#: fckeditor.module:919
+msgid "You must <a href=\"!access-control-url\">assign</a> at least one role with the 'access fckeditor' permission before creating a profile."
+msgstr "Musisz <a href=\"!access-control-url\">przypisać</a> przynajmniej jedną rolę z uprawnieniami '!access1' przed utworzeniem profilu."
+
+#: fckeditor.module:922
+msgid "You will not be allowed to create a new profile since all user roles have already been assigned profiles. Either remove an existing fckeditor profile from at least one role or assign another role the 'access fckeditor' permission."
+msgstr "Nie będziesz miał możliwości utworzenia nowego profilu, jeśli wszystkie role już mają przypisane profile. Usuń profil FCKeditor z przynajmniej jednej roli lub przypisz jakiejś roli, która jeszcze takiego uprawnienia nie miała, uprawnienia 'access fckeditor'."
+
+#: fckeditor.module:925
+msgid "Not all user roles are shown since they already have fckeditor profiles. You must first unassign profiles in order to add them to a new one."
+msgstr "Nie wszystkie role są tutaj pokazane, ponieważ część już posiada przypisane profile FCKeditor. Aby móc dodać nowy profil do jakiejś roli, usuń ją najpierw ze starego profilu."
+
+#: fckeditor.module:936
+msgid "Basic setup"
+msgstr "Podstawowe ustawienia"
+
+#: fckeditor.module:943
+msgid "Profile name"
+msgstr "Nazwa pofilu"
+
+#: fckeditor.module:947
+msgid "Enter a name for this profile. This name is only visible within the fckeditor administration page."
+msgstr "Wybierz nazwę dla tego profilu. Nazwa będzie widoczna jedynie wewnątrz sekcji administracyjnej."
+
+#: fckeditor.module:953
+msgid "Roles allowed to use this profile"
+msgstr "Role uprawnione do użytkowania tego profilu"
+
+#: fckeditor.module:956
+msgid "Check at least one role. Only roles with '!access1' permission will be shown here."
+msgstr "Wybierz przynajmniej jedną rolę. Tylko role z uprawnieniami '!access1' są tutaj pokazane."
+
+#: fckeditor.module:962
+msgid "Allow users to customize FCKeditor appearance"
+msgstr "Czy dopuścić możliwość zmiany ustawień przez użytkowników"
+
+#: fckeditor.module:965
+msgid "If allowed, users will be able to override <code>Editor appearance</code> by visiting their profile page."
+msgstr "Jeśli włączone, użytkownicy będą mieli możliwość zmiany <code>Ustawień edytora</code> poprzez ustawienia własnego profilu."
+
+#: fckeditor.module:970
+msgid "Visibility settings"
+msgstr "Ustawienia wyświetlania"
+
+#: fckeditor.module:977
+msgid "Minimum rows"
+msgstr "Minimalna ilośc wierszy"
+
+#: fckeditor.module:979
+msgid "FCKeditor will be triggered if the textarea has more rows than entered here. Enter '1' if you do not want to use this feature."
+msgstr "FCKeditor będzie dostępny tylko wtedy, jeśli pole tekstowe posiada więcej niż zdefiniowaną tutaj ilość wierszy. Wpisz '1' (jeden), aby zrezygnować z tej funkcjonalności i udostępnić FCKeditora wszystkim polom tekstowym."
+
+#: fckeditor.module:984
+msgid "Use inclusion or exclusion mode"
+msgstr "Wybierz tryb włączania/wyłączania FCKeditora"
+
+#: fckeditor.module:987
+msgid "Exclude fields, will disable the editor on all selected fields"
+msgstr "Wyłącz pola na podstawie ID, wprowadź nazwy pól na których FCKeditor nie ma być dostępny"
+
+#: fckeditor.module:988
+msgid "Include fields, will only load the editor for the selected fields"
+msgstr "Włącz FCKeditor w wybranych polach (na podstawie ID)"
+
+#: fckeditor.module:989
+msgid "Exclude paths, will disable the editor for all textareas at the configured paths"
+msgstr "Wyłącz pola na podstawie ścieżek - wprowadź nazwy ścieżek, na których FCKeditor nie ma być dostępny"
+
+#: fckeditor.module:990
+msgid "Include paths, will load the editor for all large enough textareas at the configured paths."
+msgstr "Włącz FCKeditor w wybranych ścieżkach"
+
+#: fckeditor.module:991
+msgid "Choose what to do with the following values."
+msgstr "Wybierz sposób postępowania z wprowadzonymi wartościami."
+
+#: fckeditor.module:1001
+msgid "Selected fields or paths"
+msgstr "Wybierz pola/ścieżki"
+
+#: fckeditor.module:1005
+msgid "Enter fieldnames or drupal paths here, depending on the chosen option for the inclusion mode.<br />Names (HTML ID's) of fields that may or may not have an FCKeditor.<br />Paths may be used the same way as in the drupal blocks configuration.<br />You may separate the different entries by commas, spaces or newlines. You may also use * as a wildcard character (for example <code>comment/*</code>).<br />You can not mix paths and ID's."
+msgstr "Wpisz nazwy pól lub ścieżki, w zależności od wybranej opcji.<br />Nazwy pól (ID pól tekstowych HTML), które mają mieć włączony (lub wyłączony) FCKeditor.<br />Ścieżki mogą być użyte w taki sam sposób w jaki są używane w konfiguracji bloków.<br />Możesz oddzielać kolejne definicje przecinkami, spacjami lub umieszczając każdą w osobnej linii. Możesz użyć znaku * jako symbol wieloznaczny (wildcard, na przykład <code>comment/*</code>).<br />Nie możesz jednoczenie definiować ścieżek i ID pól HTML."
+
+#: fckeditor.module:1010
+msgid "Force simplified toolbar - choose inclusion mode"
+msgstr "Wymuszenie uproszczonego paska narzędzi - zaznacz sposób wybierania"
+
+#: fckeditor.module:1013
+msgid "Include fields, will only load the simplified toolbar for the selected fields"
+msgstr "wybrane pola tekstowe według ID"
+
+#: fckeditor.module:1014
+msgid "Include paths, will load the simplified toolbar at the configured paths."
+msgstr "wybrane pola tekstowe według ścieżki"
+
+#: fckeditor.module:1015
+msgid "Choose what to do with the following values.<br/>FCKeditor will force the <code>!simple</code> toolbar on the selected fields.<br/>Useful for smaller textareas where we usually don't use very complicated HTML code, like in signatures."
+msgstr "Wybierz sposób postępowania z wprowadzonymi wartościami.<br/>FCKeditor będzie wymuszał pasek narzędzi <code>!simple</code> w wybranych polach.<br/>Użyteczne dla mniejszych pól tekstowych gdzie raczej nie korzystamy ze skomplikowanego kodu HTML, jak np. w sygnaturach."
+
+#: fckeditor.module:1025
+msgid "Selected fields or paths where simplified toolbar should appear"
+msgstr "Wybierz pola/ścieżki gdzie wymuszać uproszczony pasek narzędzi"
+
+#: fckeditor.module:1029
+msgid "If you don't want to use this feature, simply leave this field empty.<br />Enter fieldnames or drupal paths here, depending on the chosen option.<br />Names (HTML ID's) of fields that should have a simplified toolbar.<br />Paths may be used the same way as in the drupal blocks configuration.<br />You may separate the different entries by commas, spaces or newlines. You may also use * as a wildcard character (for example <code>comment/*</code>).<br />You can not mix paths and ID's."
+msgstr "Jeśli nie chcesz korzystać z tej funkcjonalności, pozostaw to pole niewypełnione.<br />Wprowadź ID pół tekstowych lub ścieżki (w zależności od wybranej opcji), które powinny mieć uproszczony pasek narzędzi.<br />Ścieżki mogą być użyte w taki sam sposób w jaki są używane w konfiguracji bloków.<br />Możesz oddzielać kolejne definicje przecinkami, spacjami lub umieszczając każdą w osobnej linii. Możesz użyć znaku * jako symbol wieloznaczny (wildcard, na przykład <code>comment/*</code>).<br />Nie możesz jednoczenie definiować ścieżek i ID pól HTML."
+
+#: fckeditor.module:1034
+msgid "Editor appearance"
+msgstr "Ustawienia edytora"
+
+#: fckeditor.module:1044
+msgid "Default editor state. If disabled, rich text editor may still be enabled using toggle or popup window."
+msgstr "Domyślny stan edytora. Jeśli wybierzesz wyłączony, edytora nadal będziesz mógł użyć przy pomocy przełącznika (linku) lub poprzez okienko popup."
+
+#: fckeditor.module:1052
+msgid "Whether or not to show the disable/enable rich text editor toggle below the textarea. Works only if FCKeditor is not running in a popup window (see below)."
+msgstr "Wybierz czy pokazywać link do włączenia/wyłączenia zaawansowanego edytora tekstowego tuż poniżej pola tekstowego. Link zostanie pokazany tylko wówczas, kiedy FCKeditor nie pracuje w trybie okienka popup (zobacz poniżej)."
+
+#: fckeditor.module:1068
+msgid "Choose a default skin."
+msgstr "Wybierz domyślną skórkę"
+
+#: fckeditor.module:1076
+msgid "Choose a default toolbar set. To define new toolbar, edit <code>fckeditor.config.js</code> located in !module_path."
+msgstr "Wybierz domyślny pasek narzędzi. Aby zdefiniować nowy pasek narzędzi (toolbar), zmodyfikuj plik <code>fckeditor.config.js</code> z katalogu !module_path."
+
+#: fckeditor.module:1124
+msgid "Cleanup and output"
+msgstr "Formatowanie tekstu"
+
+#: fckeditor.module:1131
+msgid "Enter mode"
+msgstr "Tryb [Enter]"
+
+#: fckeditor.module:1134
+msgid "Set which tag FCKeditor should use when [Enter] key is pressed."
+msgstr "Wybierz, który tag FCKeditor ma używać, kiedy naciśnięty zostanie klawisz [Enter]"
+
+#: fckeditor.module:1139
+msgid "Shift + Enter mode"
+msgstr "Tryb [Shift] + [Enter]"
+
+#: fckeditor.module:1142
+msgid "Set which tag FCKeditor should use when [Shift] + [Enter] is pressed."
+msgstr "Wybierz, który tag FCKeditor ma używać, kiedy naciśnięte zostaną klawisze [Shift] + [Enter]"
+
+#: fckeditor.module:1147
+msgid "Font formats"
+msgstr "Lista elementów blokowych"
+
+#: fckeditor.module:1151
+msgid "Semicolon separated list of HTML font formats. Allowed values are: p;div;pre;address;h1;h2;h3;h4;h5;h6"
+msgstr "Lista dozwolonych elementów blokowych oddzielona średnikami (na jej podstawie zostanie utworzona lista rozwijana). Dozwolone wartości: p;div;pre;address;h1;h2;h3;h4;h5;h6"
+
+#: fckeditor.module:1156
+msgid "Apply source formatting"
+msgstr "Formatuj kod źródłowy"
+
+#: fckeditor.module:1159
+msgid "When set to \"true\" the editor will format the XHTML when switching from WYSIWYG view to Source view, by inserting line breaks on some tags endings and indenting paragraphs, tables and lists."
+msgstr "Jeśli włączone, edytor będzie formatował kod XHTML podczas przełączania z trybu WYSIWYG na tekstowy poprzez wstawianie znaków nowej linii na koniec niektórych tagów i dokonując wcięć w paragrafach, tablicach i listach."
+
+#: fckeditor.module:1164
+msgid "Format output"
+msgstr "Formatuj"
+
+#: fckeditor.module:1167
+msgid "When set to \"true\" the editor will format the XHTML output by inserting line breaks on some tags endings and indenting paragraphs, tables and lists."
+msgstr "Jeśli włączone, edytor będzie formatował XHTML poprzez wstawianie znaków nowej linii na koniec niektórych tagów i dokonując wcięć w paragrafach, tablicach i listach."
+
+#: fckeditor.module:1182
+msgid "CSS"
+msgstr "CSS"
+
+#: fckeditor.module:1189
+msgid "Editor CSS"
+msgstr "CSS wewnątrz edytora"
+
+#: fckeditor.module:1191
+msgid "use theme css"
+msgstr "użyj styl css skórki"
+
+#: fckeditor.module:1191
+msgid "define css"
+msgstr "zdefiniowany css"
+
+#: fckeditor.module:1191
+msgid "FCKeditor default"
+msgstr "domyślny styl FCKeditor"
+
+#: fckeditor.module:1192
+msgid "Defines the CSS to be used in the editor area.<br />use theme css - load style.css from current site theme.<br/>define css - enter path for css file below.<br />FCKeditor default - uses default CSS from editor."
+msgstr "Zdefiniuj w jaki sposób CSS ma zostać zastosowane wewnątrz edytora.<br />użyj styl css skórki - załaduj plik style.css z aktualnie wybranej skórki.<br/>zdefiniowany css - podaj ścieżkę do pliku css poniżej.<br />domyślny styl FCKeditor - użyj domyślny plik CSS dostarczony z edytorem."
+
+#: fckeditor.module:1197
+msgid "CSS path"
+msgstr "Ścieżka do CSS"
+
+#: fckeditor.module:1201
+msgid "Enter path to CSS file (<em>example: \"css/editor.css\"</em>) or a list of css files seperated by a comma (<em>example: /themes/garland/style.css,http://example.com/style.css</em>).<br />Macros: %h (host name: !host), %t (path to theme: !theme)<br />Be sure to select \"define css\" above."
+msgstr "Podaj ścieżkę do pliku ze stylami CSS (<em>przykład: \"css/editor.css\"</em>) lub listę plików css oddzielonych przecinkami (<em>przykład: /themes/garland/style.css,http://example.com/style.css</em>).<br />Dozwolone są makra: %h (nazwa hosta: !host), %t (ścieżka do skórki: !theme)<br />Upewnij się że wybrałeś powyżej opcję \"zdefiniowany css\"."
+
+#: fckeditor.module:1206
+msgid "CSS classes"
+msgstr "Klasy CSS"
+
+#: fckeditor.module:1207
+msgid "Requires manual configuration."
+msgstr "Wymaga ręcznej modyfikacji pliku konfiguracyjnego."
+
+#: fckeditor.module:1208
+msgid "Style dropdown list loads styles defined in <code>!fckstyles.xml</code>. Copy this file inside your theme directory (<code>!theme</code>) and adjust it to your needs. If you modify the original file, changes will be applied to all themes, however it may get overwritten if you upgrade FCKeditor."
+msgstr "Lista rozwijana z definicją klas CSS ładuje style zdefiniowane w pliku !fckstyles.xml. Skopiuj ten plik do katalogu z wybraną skórką (<code>!theme</code>) i dostosuj do wybranych potrzeb. Jeśli zmodyfikujesz oryginalny plik, zmiany zostaną zastosowane we wszystkich skórkach, ale uwaga - możesz je utracić, jeśli je nadpiszesz przy upgradzie FCKeditora."
+
+#: fckeditor.module:1215;1224
+msgid "File browser settings"
+msgstr "Ustawienia przeglądarki plików"
+
+#: fckeditor.module:1218
+msgid "The file browser settings are not diplayed because you have configured IMCE to handle file browsing."
+msgstr "Ustawienia menadżera plików nie są dostępne, ponieważ domyślną przeglądarką plików jest IMCE."
+
+#: fckeditor.module:1227
+msgid "Set file browser settings. If you enable file uploads and disable basic and advanced file management, you will need to manage your images and other files with the core upload module or a contrib module like !imce. Please note that these options require manual configuration, check !readme for more information.<br />"
+msgstr "Ustawienia menadżera plików. Jeśli pozwolisz na uploadowanie plików, ale jednocześnie wyłączych dostęp do uproszczonego jak i zaawansowanego uploadowania plików, będziesz musiał użyć do uploadowania plików wbudowany moduł Drupala lub inny tego rodzaju moduł jak np. !imce. Rrzeczytaj !readme aby uzyskać więcej informacji."
+
+#: fckeditor.module:1247
+msgid "Allow basic file management"
+msgstr "Dostęp do uproszczonego uploadowania plików."
+
+#: fckeditor.module:1249
+msgid "Allow quick uploads. All files will be placed in the directory designated in the configuration file."
+msgstr "Dostęp do \"quick uploads\" w FCKeditor."
+
+#: fckeditor.module:1254
+msgid "Allow advanced file management"
+msgstr "Dostęp do zaawansowanego menadżera (przeglądarki) plików."
+
+#: fckeditor.module:1256
+msgid "Allow file management in the advanced file manager. All files will be placed in subdirectories of the default drupal upload directory."
+msgstr "Umożliw zarządzanie plikami poprzez zaawansowany menadżer plików. Pliki zostaną umieszczone w domyślnym katalogu drupala na uploadowane pliki."
+
+#: fckeditor.info:0
+msgid "Enables the usage of FCKeditor (WYSIWYG) instead of plain text fields."
+msgstr "Umożliwa zastąpienie zwykłych pól tekstowych wizualnym edytorem HTML (WYSIWYG)."
+