Commit 9e3e05cd authored by sun's avatar sun

#264411 by sun: Cleaned coding-style using coder_format script.

parent a2f0b052
......@@ -10,9 +10,11 @@ Wysiwyg 6.x-1.x, xxxx-xx-xx
Wysiwyg 6.x-0.x, xxxx-xx-xx
---------------------------
#264411 by sun: Cleaned coding-style using coder_format script.
#264411 by sun: Moved admin functions into separate include file.
#264411 by sun: Added TinyMCE data import upon installation.
#264411 by sun: Renamed module to Wysiwyg Editor.
#118747 by nedjo, sun: Upgraded code for jQuery.
Initial fork of TinyMCE module (2008-05-30).
This diff is collapsed.
<?php
// $Id$
/**
* Implementation of hook_install().
*/
......@@ -32,9 +33,9 @@ function wysiwyg_editor_install() {
PRIMARY KEY (name,rid)
)");
break;
}
// Import data from old editor modules.
wysiwyg_editor_migrate_tinymce();
}
// Import data from old editor modules.
wysiwyg_editor_migrate_tinymce();
}
/**
......@@ -56,7 +57,7 @@ function wysiwyg_editor_migrate_tinymce() {
db_query('INSERT INTO {wysiwyg_editor_profile} SELECT * FROM {tinymce_settings}');
// Import TinyMCE profile role assignments.
db_query('INSERT INTO {wysiwyg_editor_role} SELECT * FROM {tinymce_role}');
// Disable TinyMCE module.
module_disable(array('tinymce'));
}
......
This diff is collapsed.
<?php
// $Id$
/**
* @file
* Registers TinyMCE plugins for the Drupal TinyMCE module. Note these settings
......@@ -9,98 +10,99 @@
function _wysiwyg_editor_plugins() {
/**
* A couple of notes about adding plugins.
*
* 1) Don't use any of the *_add or *_add_before hooks for theme button placement.
* Stick with theme_advanced_buttons1, theme_advanced_buttons2,
* theme_advanced_buttons3 only.
*
* 2) You can change the order of the buttons by moving the plugins around in
* this code. You can also change the order of the button array for each plugin.
*/
/**
* A couple of notes about adding plugins.
*
* 1) Don't use any of the *_add or *_add_before hooks for theme button placement.
* Stick with theme_advanced_buttons1, theme_advanced_buttons2,
* theme_advanced_buttons3 only.
*
* 2) You can change the order of the buttons by moving the plugins around in
* this code. You can also change the order of the button array for each plugin.
*/
$plugins['advhr'] = array();
$plugins['advhr']['theme_advanced_buttons3'] = array('advhr');
$plugins['advhr']['extended_valid_elements'] = array('hr[class|width|size|noshade]');
$plugins['advhr'] = array();
$plugins['advhr']['theme_advanced_buttons3'] = array('advhr');
$plugins['advhr']['extended_valid_elements'] = array('hr[class|width|size|noshade]');
$plugins['advimage'] = array();
$plugins['advimage']['extended_valid_elements'] = array('img[class|src|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name]');
$plugins['advimage'] = array();
$plugins['advimage']['extended_valid_elements'] = array('img[class|src|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name]');
$plugins['advlink'] = array();
$plugins['advlink']['extended_valid_elements'] = array('a[name|href|target|title|onclick]');
$plugins['advlink'] = array();
$plugins['advlink']['extended_valid_elements'] = array('a[name|href|target|title|onclick]');
$plugins['autosave'] = array();
$plugins['autosave'] = array();
$plugins['contextmenu'] = array();
$plugins['contextmenu'] = array();
// Note this isn't a true plugin, rather it's buttons made available by the advanced theme.
$plugins['default'] = array();
$plugins['default']['theme_advanced_buttons1'] = array('bold', 'italic', 'underline', 'strikethrough', 'justifyleft', 'justifycenter', 'justifyright', 'justifyfull', 'bullist', 'numlist', 'outdent', 'indent', 'undo', 'redo', 'link', 'unlink', 'anchor');
$plugins['default']['theme_advanced_buttons2'] = array('image', 'cleanup', 'forecolor', 'backcolor', 'sup', 'sub', 'code', 'hr');
$plugins['default']['theme_advanced_buttons3'] = array('cut', 'copy', 'paste', 'visualaid', 'removeformat', 'charmap', 'help');
// Note this isn't a true plugin, rather it's buttons made available by the advanced theme.
$plugins['default'] = array();
$plugins['default']['theme_advanced_buttons1'] = array('bold', 'italic', 'underline', 'strikethrough', 'justifyleft', 'justifycenter', 'justifyright', 'justifyfull', 'bullist', 'numlist', 'outdent', 'indent', 'undo', 'redo', 'link', 'unlink', 'anchor');
$plugins['default']['theme_advanced_buttons2'] = array('image', 'cleanup', 'forecolor', 'backcolor', 'sup', 'sub', 'code', 'hr');
$plugins['default']['theme_advanced_buttons3'] = array('cut', 'copy', 'paste', 'visualaid', 'removeformat', 'charmap', 'help');
$plugins['directionality'] = array();
$plugins['directionality']['theme_advanced_buttons3'] = array('ltr', 'rtl');
$plugins['directionality'] = array();
$plugins['directionality']['theme_advanced_buttons3'] = array('ltr', 'rtl');
$plugins['emotions'] = array();
$plugins['emotions']['theme_advanced_buttons3'] = array('emotions');
$plugins['emotions'] = array();
$plugins['emotions']['theme_advanced_buttons3'] = array('emotions');
$plugins['filemanager'] = array();
$plugins['filemanager'] = array();
$plugins['flash'] = array();
$plugins['flash']['theme_advanced_buttons3'] = array('flash');
$plugins['flash']['extended_valid_elements'] = array('img[class|src|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|obj|param|embed]');
$plugins['flash'] = array();
$plugins['flash']['theme_advanced_buttons3'] = array('flash');
$plugins['flash']['extended_valid_elements'] = array('img[class|src|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|obj|param|embed]');
// Note this isn't a true plugin, rather it's buttons made available by the advanced theme.
$plugins['font'] = array();
$plugins['font']['theme_advanced_buttons1'] = array('formatselect', 'fontselect', 'fontsizeselect', 'styleselect');
$plugins['font']['extended_valid_elements'] = array('font[face|size|color|style],span[class|align|style]');
// Note this isn't a true plugin, rather it's buttons made available by the advanced theme.
$plugins['font'] = array();
$plugins['font']['theme_advanced_buttons1'] = array('formatselect', 'fontselect', 'fontsizeselect', 'styleselect');
$plugins['font']['extended_valid_elements'] = array('font[face|size|color|style],span[class|align|style]');
$plugins['fullscreen'] = array();
$plugins['fullscreen']['theme_advanced_buttons3'] = array('fullscreen');
$plugins['fullscreen'] = array();
$plugins['fullscreen']['theme_advanced_buttons3'] = array('fullscreen');
$plugins['iespell'] = array();
$plugins['iespell']['theme_advanced_buttons3'] = array('iespell');
$plugins['iespell'] = array();
$plugins['iespell']['theme_advanced_buttons3'] = array('iespell');
$plugins['imagemanager'] = array();
$plugins['imagemanager'] = array();
$plugins['inlinepopups'] = array();
$plugins['inlinepopups'] = array();
$plugins['insertdatetime'] = array();
$plugins['insertdatetime']['theme_advanced_buttons2'] = array('insertdate', 'inserttime');
$plugins['insertdatetime']['plugin_insertdate_dateFormat'] = array('%Y-%m-%d');
$plugins['insertdatetime']['plugin_insertdate_timeFormat'] = array('%H:%M:%S');
$plugins['insertdatetime'] = array();
$plugins['insertdatetime']['theme_advanced_buttons2'] = array('insertdate', 'inserttime');
$plugins['insertdatetime']['plugin_insertdate_dateFormat'] = array('%Y-%m-%d');
$plugins['insertdatetime']['plugin_insertdate_timeFormat'] = array('%H:%M:%S');
$plugins['layer'] = array();
$plugins['layer']['theme_advanced_buttons3'] = array('insertlayer', 'moveforward', 'movebackward', 'absolute');
$plugins['layer'] = array();
$plugins['layer']['theme_advanced_buttons3'] = array('insertlayer', 'moveforward', 'movebackward', 'absolute');
$plugins['paste'] = array();
$plugins['paste']['theme_advanced_buttons3'] = array('pastetext', 'pasteword', 'selectall');
$plugins['paste'] = array();
$plugins['paste']['theme_advanced_buttons3'] = array('pastetext', 'pasteword', 'selectall');
$plugins['preview'] = array();
$plugins['preview']['theme_advanced_buttons2'] = array('preview');
$plugins['preview'] = array();
$plugins['preview']['theme_advanced_buttons2'] = array('preview');
$plugins['print'] = array();
$plugins['print']['theme_advanced_buttons3'] = array('print');
$plugins['print'] = array();
$plugins['print']['theme_advanced_buttons3'] = array('print');
$plugins['searchreplace'] = array();
$plugins['searchreplace']['theme_advanced_buttons2'] = array('search', 'replace');
$plugins['searchreplace'] = array();
$plugins['searchreplace']['theme_advanced_buttons2'] = array('search', 'replace');
if (is_dir(drupal_get_path('module', 'wysiwyg_editor') . '/tinymce/jscripts/tiny_mce/plugins/spellchecker/')) {
$plugins['spellchecker'] = array();
$plugins['spellchecker']['theme_advanced_buttons3'] = array('spellchecker');
}
$plugins['style'] = array();
$plugins['style']['theme_advanced_buttons3'] = array('styleprops');
if (is_dir(drupal_get_path('module', 'wysiwyg_editor') .'/tinymce/jscripts/tiny_mce/plugins/spellchecker/')) {
$plugins['spellchecker'] = array();
$plugins['spellchecker']['theme_advanced_buttons3'] = array('spellchecker');
}
$plugins['style'] = array();
$plugins['style']['theme_advanced_buttons3'] = array('styleprops');
$plugins['table'] = array();
$plugins['table']['theme_advanced_buttons3'] = array('tablecontrols');
$plugins['table'] = array();
$plugins['table']['theme_advanced_buttons3'] = array('tablecontrols');
$plugins['zoom'] = array();
$plugins['zoom']['theme_advanced_buttons2'] = array('zoom');
$plugins['zoom'] = array();
$plugins['zoom']['theme_advanced_buttons2'] = array('zoom');
return $plugins;
return $plugins;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment