Tinymce gzip compressor and Drupal 5

To enable gzip compression for Tinymce and Drupal:

1. Download the tinymce compressor, upload to your server, unzip, and place tiny_mce_gzip.js and tiny_mce_gzip.php, which are both included with the compressor in the same folder as tiny_mce.js in the /tinymce/includes/jscripts/tiny_mce directory (you know you have the right place if you see tiny_mce.js)

2. Newer versions of the TinyMCE module will automatically detect the gzip files and enable it automatically. So if you download the latest version of TinyMCE module, you're done!

Note: If you have an older version and don't want to upgrade for some reason, you may need to open tinymce.module in a text editor. Change the line:
drupal_add_js(drupal_get_path('module', 'tinymce') . '/includes/jscripts/tiny_mce/tiny_mce_gzip.js');

to

drupal_add_js(drupal_get_path('module', 'tinymce') . '/includes/jscripts/tiny_mce/tiny_mce_gzip.php');

Save your changes, and you're done.

correction

Bevan - February 13, 2007 - 23:14

I think you're supposed to change tiny_mce.js to tiny_mce_gzip.php. I couldn't find drupal_add_js(drupal_get_path('module', 'tinymce') . '/includes/jscripts/tiny_mce/tiny_mce_gzip.js'); in tinymce.module v 1.90.4.12 2007/01/30.

It appears that newer

itzfritz - May 22, 2007 - 00:19

It appears that newer versions of the tinymce module support this by default:

(from tinymce.module,v 1.90.4.23 2007/05/06 01:41:35)

<?php
...
     
// TinyMCE Compressor 1.0.9 and greater
     
if (file_exists($tinymce_mod_path . '/tinymce/jscripts/tiny_mce/tiny_mce_gzip.js')) {
       
drupal_add_js($tinymce_mod_path . '/tinymce/jscripts/tiny_mce/tiny_mce_gzip.js');
       
drupal_add_js($tinymce_gz_invoke, 'inline');
      }
     
// TinyMCE Compressor (versions < 1.0.9)
     
elseif (file_exists($tinymce_mod_path . '/tinymce/jscripts/tiny_mce/tiny_mce_gzip.php')) {
       
drupal_add_js($tinymce_mod_path . '/tinymce/jscripts/tiny_mce/tiny_mce_gzip.php');
      }
...
?>

the path for me is

roedelius - May 20, 2007 - 21:45

the path for me is /modules/tinymce/tinymce/jscripts/tiny_mce

 
 

Drupal is a registered trademark of Dries Buytaert.