Changeset 855

Show
Ignore:
Timestamp:
01/23/07 04:47:18 (2 years ago)
Author:
sven
Message:

tinymce: reenable disk caching, reduce javascript code footprint, enable per-plugin language support with english failover. had to modify core tinymce as it doesn't pass all of its params.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • devel/_tinymce/jscripts/tiny_mce/tiny_mce_gzip.php

    r848 r855  
    11<?php 
     2// NB: THIS FILE HAS CHANGED FROM UPSTREAM 
     3 
     4require_once(dirname(dirname(dirname(dirname(__FILE__))))."/config.php"); 
     5 
    26/** 
    37 * $Id: tiny_mce_gzip.php 158 2006-12-21 14:32:19Z spocke $ 
     
    2125        $isJS = getParam("js", "") == "true"; 
    2226        $compress = getParam("compress", "true") == "true"; 
    23         $suffix = getParam("suffix", "_src") == "_src" ? "_src" : ""; 
    24         $cachePath = realpath("."); // Cache path, this is where the .gz files will be stored 
     27        $suffix = getParam("suffix", "") == "_src" ? "_src" : ""; // CHANGED FROM UPSTREAM 
     28        $cachePath = realpath($CFG->dataroot . "cache"); // Cache path, this is where the .gz files will be stored // CHANGED FROM UPSTREAM 
    2529        $expiresOffset = 3600 * 24 * 10; // Cache for 10 days in browser cache 
    2630        $content = ""; 
  • devel/units/tinymce/tinymce_js.php

    r848 r855  
    2121                $lang = substr($USER->locale, 0, 2); 
    2222            } else { 
    23                 $lang = $USER->locale;                 
     23                $lang = $USER->locale; 
    2424            } 
    2525        } 
    2626 
    27         // Loose the trailing slash 
     27        // Lose the trailing slash 
    2828        $url = substr($CFG->wwwroot, 0, -1); 
    2929 
    3030        global $metatags; 
    31  
     31         
     32        // gzip thingy should only assemble plugins we're actually using 
     33        $plugins = 'spellchecker,emotions,contextmenu,preview,style,searchreplace,autosave'; 
     34        //plugins : 'style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,spellchecker', 
     35         
    3236        $metatags .= <<< END 
    3337    <script language="javascript" type="text/javascript" src="$url/_tinymce/jscripts/tiny_mce/tiny_mce_gzip.js"></script> 
     
    3539    <script language="javascript" type="text/javascript"> 
    3640    tinyMCE_GZ.init({ 
    37         plugins : 'style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,spellchecker', 
    38         themes : 'simple,advanced', 
    39         languages : 'en', 
     41        plugins : '$plugins', 
     42        themes : 'advanced', 
     43        languages : 'en,$lang', 
    4044        disk_cache : true, 
    4145        debug : false 
     
    4751        language : "$lang", 
    4852        mode : "exact", 
    49         plugins : "spellchecker,emotions,contextmenu,preview,style,searchreplace,autosave", 
     53        plugins : "$plugins", 
    5054        convert_urls : false, 
    5155        relative_urls : false,