Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have had several users complain that the FeedBurner module settings gets messed up when FCKeditor is enabled. Could you please add the field id 'edit-feedburner-useragents' to the default exclusion list?
Maybe it would be useful to have the following functions in FCKeditor for module developers to help exclude their own fields or paths?
function fckeditor_exclude_field($field) {
$result = unserialize(db_result(db_query("SELECT settings FROM {fckeditor_settings} WHERE name = 'FCKeditor Global Profile'")));
$settings = array_merge(array('excl_mode' => 0, 'excl_fields' => ''), $settings);
if (!$settings['excl_mode']) {
$field_regex = '/^'. preg_quote($field) .'$/im';
if (!preg_match($field_regex, $settings['excl_fields'])) {
$settings['excl_fields'] .= $field ."\n";
db_query("UPDATE {fckeditor_settings} SET settings = '%s' WHERE name = 'FCKeditor Global Profile'", serialize($settings));
}
}
}
function fckeditor_exclude_path($path) {
$settings = unserialize(db_result(db_query("SELECT settings FROM {fckeditor_settings} WHERE name = 'FCKeditor Global Profile'")));
$settings = array_merge(array('excl_mode' => 0, 'excl_paths' => ''), $settings);
if (!$settings['excl_mode']) {
$path = drupal_get_normal_path($path);
$path_regex = '/^'. preg_quote($path, '/') .'$/im';
if (!preg_matchc($path_regex, $settings['excl_paths'])) {
$settings['excl_paths'] .= $path ."\n";
db_query("UPDATE {fckeditor_settings} SET settings = '%s' WHERE name = 'FCKeditor Global Profile'", serialize($settings));
}
}
}
Comments
Comment #1
Dave ReidReally all I need is to have 'edit-feedburner-useragents' added to the default exclusion list. The code is just a suggestion. Anyone?
Comment #2
wwalc CreditAttribution: wwalc commentedAdded to default exclusion list.
However when people are upgrading FCKeditor module, they do not get the new ID's automatically... so I have additionally added checking for #fckeditor property in textarea element:
...so to disable FCKeditor on specific field just set #fckeditor to FALSE.
This problem will hopefully be solved in Drupal 7, in the meantime that should do the trick.
Comment #3
Dave ReidCould you maybe just check for #wysiwyg = FALSE so that it can be compatible with the current method in the WYSIWYG project?
Comment #4
wwalc CreditAttribution: wwalc commentedYeah, that was pretty bad idea. Renamed to #wysiwyg.
Some more explanation: FCKeditor now respects #wysiwyg attribute in textarea element. If #wysiwyg is set to FALSE, FCKeditor will not appear on that field regardless of user settings. On the other side, setting #wysiwyg to TRUE doesn't change anything (it does not force FCKeditor on that field if user decided to not enable FCKeditor on that textarea).
Comment #5
Dave ReidThanks wwalc! :)
Comment #6
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.