加速 EnhancedEntryEditing

EnhancedEntryEditing 是一个 movable type 插件,它添加开源 WYSIWYG 编辑器 tinyMCE 作为 movable type 的文章发布工具,使得编辑和发布文章变得更简单了,但是 tinyMCE 在没有启用 gzip 压缩时,速度非常慢,通过修改代码,可以让 EnhancedEntryEditing 支持 gzip 压缩。

下载 TinyMCE compressor PHP,解压到 mt-static/plugins/EnhancedEntryEditing/tiny_mce 下,修改 plugins/EnhancedEntryEditing/EnhancedEntryEditing.pl,将

<script type=”text/javascript” src=”<TMPL_VAR NAME=STATIC_URI>plugins/EnhancedEntryEditing/tiny_mce/tiny_mce.js”></script>

替换为

<script type=”text/javascript” src=”<TMPL_VAR NAME=STATIC_URI>plugins/EnhancedEntryEditing/tiny_mce/tiny_mce_gzip.js”></script>

并且在 <script type=”text/javascript”> 后加入

tinyMCE_GZ.init({
 plugins : ‘inlinepopups,advimage,advlink,table,emotions,autosave,media’,
 themes : ‘advanced’,
 languages : ‘en’,
 disk_cache : true,
 debug : false
});

plugins 是启用的插件,现在再用 EnhancedEntryEditing 发布文章,会发现 tinyMCE 的引导速度快了很多。

EnhancedEntryEditing

不足:在 ie 下是正常的,在 firefox 下不能正常显示,或许是哪里设置出了问题。

Tags:

This entry was posted on Monday, November 19th, 2007 at 7:16 pm and is filed under movable type. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Posts you may enjoy

Leave a Reply

Please copy the string vkIURR to the field below: