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.
To ease the maintenance of sites I would make possible to have the third party scripts (generally speaking, this should, to me, applies to every modules) outside of the module directories.
For example
- sites
- example.com
- files
- settings.php
- themes
- all
- modules
- getid3
- tinytinymce
- views
- ...
- thirdparty
- getid3
- tinymce
- ...
- modules
- example.com
For Tiny Tiny MCE I just had to made a small modification to the tinytinymce.module file
- Adding:
$form['tinytinymce_scripts_path'] = array( '#type' => 'textfield', '#default_value' => variable_get('tinytinymce_scripts_path', drupal_get_path('module', 'tinytinymce') .'/tinymce/jscripts/tiny_mce/tiny_mce.js'), '#title' => t('Location of tiny_mce.js'), );
in
tinytinymce_admin()
- Changing:
$path = drupal_get_path('module', 'tinytinymce'); drupal_add_js($path.'/tinymce/jscripts/tiny_mce/tiny_mce.js', 'module', 'header', false, true, false);
to
/* $path = drupal_get_path('module', 'tinytinymce'); drupal_add_js($path.'/tinymce/jscripts/tiny_mce/tiny_mce.js', 'module', 'header', false, true, false); */ $path =variable_get('tinytinymce_scripts_path', drupal_get_path('module', 'tinytinymce') .'/tinymce/jscripts/tiny_mce/tiny_mce.js'); drupal_add_js($path, 'module', 'header', false, true, false);
in
tinytinymce_theme_textarea()
Of course some "help / instructions" have to be changed too.
An other advantage of this is to be able to easly switch between 2 versions of TinyMCE...
Do you like it?