From 2c633703e97eb6e7aa7ba840ef86b1fc1bd98ada Mon Sep 17 00:00:00 2001 From: svncommit Date: Thu, 24 May 2007 03:49:19 +0000 Subject: upgrade to TinyMCE v2.1.1.1 --- program/js/tiny_mce/plugins/media/css/content.css | 0 program/js/tiny_mce/plugins/media/css/media.css | 0 program/js/tiny_mce/plugins/media/editor_plugin.js | 2 +- .../js/tiny_mce/plugins/media/editor_plugin_src.js | 8 +-- program/js/tiny_mce/plugins/media/images/flash.gif | Bin program/js/tiny_mce/plugins/media/images/media.gif | Bin .../js/tiny_mce/plugins/media/images/quicktime.gif | Bin .../js/tiny_mce/plugins/media/images/realmedia.gif | Bin .../js/tiny_mce/plugins/media/images/shockwave.gif | Bin .../tiny_mce/plugins/media/images/windowsmedia.gif | Bin .../js/tiny_mce/plugins/media/jscripts/embed.js | 0 .../js/tiny_mce/plugins/media/jscripts/media.js | 24 ++++++- program/js/tiny_mce/plugins/media/langs/en.js | 2 +- program/js/tiny_mce/plugins/media/media.htm | 2 +- .../tiny_mce/plugins/nonbreaking/editor_plugin.js | 0 .../plugins/nonbreaking/editor_plugin_src.js | 0 .../plugins/nonbreaking/images/nonbreaking.gif | Bin .../js/tiny_mce/plugins/nonbreaking/langs/en.js | 0 .../plugins/searchreplace/css/searchreplace.css | 0 .../searchreplace/images/replace_all_button_bg.gif | Bin .../searchreplace/images/replace_button_bg.gif | Bin .../searchreplace/jscripts/searchreplace.js | 0 .../plugins/searchreplace/searchreplace.htm | 0 .../spellchecker/classes/TinyGoogleSpell.class.php | 74 ++++++++++----------- .../js/tiny_mce/plugins/spellchecker/config.php | 4 +- .../js/tiny_mce/plugins/table/images/buttons.gif | Bin 1765 -> 1787 bytes .../plugins/table/images/table_delete_col.gif | Bin 163 -> 153 bytes .../plugins/table/images/table_delete_row.gif | Bin 171 -> 160 bytes program/js/tiny_mce/plugins/table/langs/en.js | 2 +- .../tiny_mce/plugins/visualchars/editor_plugin.js | 0 .../plugins/visualchars/editor_plugin_src.js | 0 .../plugins/visualchars/images/visualchars.gif | Bin .../js/tiny_mce/plugins/visualchars/langs/en.js | 0 33 files changed, 69 insertions(+), 49 deletions(-) mode change 100755 => 100644 program/js/tiny_mce/plugins/media/css/content.css mode change 100755 => 100644 program/js/tiny_mce/plugins/media/css/media.css mode change 100755 => 100644 program/js/tiny_mce/plugins/media/editor_plugin.js mode change 100755 => 100644 program/js/tiny_mce/plugins/media/editor_plugin_src.js mode change 100755 => 100644 program/js/tiny_mce/plugins/media/images/flash.gif mode change 100755 => 100644 program/js/tiny_mce/plugins/media/images/media.gif mode change 100755 => 100644 program/js/tiny_mce/plugins/media/images/quicktime.gif mode change 100755 => 100644 program/js/tiny_mce/plugins/media/images/realmedia.gif mode change 100755 => 100644 program/js/tiny_mce/plugins/media/images/shockwave.gif mode change 100755 => 100644 program/js/tiny_mce/plugins/media/images/windowsmedia.gif mode change 100755 => 100644 program/js/tiny_mce/plugins/media/jscripts/embed.js mode change 100755 => 100644 program/js/tiny_mce/plugins/media/jscripts/media.js mode change 100755 => 100644 program/js/tiny_mce/plugins/media/langs/en.js mode change 100755 => 100644 program/js/tiny_mce/plugins/media/media.htm mode change 100755 => 100644 program/js/tiny_mce/plugins/nonbreaking/editor_plugin.js mode change 100755 => 100644 program/js/tiny_mce/plugins/nonbreaking/editor_plugin_src.js mode change 100755 => 100644 program/js/tiny_mce/plugins/nonbreaking/images/nonbreaking.gif mode change 100755 => 100644 program/js/tiny_mce/plugins/nonbreaking/langs/en.js mode change 100755 => 100644 program/js/tiny_mce/plugins/searchreplace/css/searchreplace.css mode change 100755 => 100644 program/js/tiny_mce/plugins/searchreplace/images/replace_all_button_bg.gif mode change 100755 => 100644 program/js/tiny_mce/plugins/searchreplace/images/replace_button_bg.gif mode change 100755 => 100644 program/js/tiny_mce/plugins/searchreplace/jscripts/searchreplace.js mode change 100755 => 100644 program/js/tiny_mce/plugins/searchreplace/searchreplace.htm mode change 100755 => 100644 program/js/tiny_mce/plugins/visualchars/editor_plugin.js mode change 100755 => 100644 program/js/tiny_mce/plugins/visualchars/editor_plugin_src.js mode change 100755 => 100644 program/js/tiny_mce/plugins/visualchars/images/visualchars.gif mode change 100755 => 100644 program/js/tiny_mce/plugins/visualchars/langs/en.js (limited to 'program/js/tiny_mce/plugins') diff --git a/program/js/tiny_mce/plugins/media/css/content.css b/program/js/tiny_mce/plugins/media/css/content.css old mode 100755 new mode 100644 diff --git a/program/js/tiny_mce/plugins/media/css/media.css b/program/js/tiny_mce/plugins/media/css/media.css old mode 100755 new mode 100644 diff --git a/program/js/tiny_mce/plugins/media/editor_plugin.js b/program/js/tiny_mce/plugins/media/editor_plugin.js old mode 100755 new mode 100644 index 18337a69c..d43198656 --- a/program/js/tiny_mce/plugins/media/editor_plugin.js +++ b/program/js/tiny_mce/plugins/media/editor_plugin.js @@ -1 +1 @@ -tinyMCE.importPluginLanguagePack('media');var TinyMCE_MediaPlugin={getInfo:function(){return{longname:'Media',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/media',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion}},initInstance:function(inst){if(inst.hasPlugin('flash')&&!tinyMCE.flashWarn){alert('Flash plugin is deprecated and should not be used together with the media plugin.');tinyMCE.flashWarn=true}if(!tinyMCE.settings['media_skip_plugin_css'])tinyMCE.importCSS(inst.getDoc(),tinyMCE.baseURL+"/plugins/media/css/content.css")},getControlHTML:function(cn){switch(cn){case"media":return tinyMCE.getButtonHTML(cn,'lang_media_desc','{$pluginurl}/images/media.gif','mceMedia')}return""},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mceMedia":tinyMCE.openWindow({file:'../../plugins/media/media.htm',width:430+tinyMCE.getLang('lang_media_delta_width',0),height:470+tinyMCE.getLang('lang_media_delta_height',0)},{editor_id:editor_id,inline:"yes"});return true}return false},cleanup:function(type,content,inst){var nl,img,i,ne,d,s,ci;switch(type){case"insert_to_editor":img=tinyMCE.getParam("theme_href")+'/images/spacer.gif';content=content.replace(/]*>\s*write(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)\(\{([^\)]*)\}\);\s*<\/script>/gi,'');content=content.replace(/]*)>/gi,'
');content=content.replace(/]*)>/gi,'
');content=content.replace(/<\/(object|embed)([^>]*)>/gi,'
');content=content.replace(/]*)>/gi,'
');content=content.replace(new RegExp('\\/ class="mceItemParam"><\\/div>','gi'),'class="mceItemParam">
');break;case"insert_to_editor_dom":d=inst.getDoc();nl=content.getElementsByTagName("img");for(i=0;i',startPos);attribs=TinyMCE_MediaPlugin._parseAttributes(content.substring(startPos+4,endPos));if(!/mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(attribs['class']))continue;endPos+=2;at=attribs['title'];if(at){at=at.replace(/&(#39|apos);/g,"'");at=at.replace(/&#quot;/g,'"');try{pl=eval('x={'+at+'};')}catch(ex){pl={}}}if(!tinyMCE.getParam('media_use_script',false)){switch(attribs['class']){case'mceItemFlash':ci='d27cdb6e-ae6d-11cf-96b8-444553540000';cb='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0';mt='application/x-shockwave-flash';break;case'mceItemShockWave':ci='166B1BCA-3F9C-11CF-8075-444553540000';cb='http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0';mt='application/x-director';break;case'mceItemWindowsMedia':ci=tinyMCE.getParam('media_wmp6_compatible')?'05589FA1-C356-11CE-BF01-00AA0055595A':'6BF52A52-394A-11D3-B153-00C04F79FAA6';cb='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701';mt='application/x-mplayer2';break;case'mceItemQuickTime':ci='02BF25D5-8C17-4B23-BC80-D3488ABDDC6B';cb='http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0';mt='video/quicktime';break;case'mceItemRealMedia':ci='CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA';cb='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0';mt='audio/x-pn-realaudio-plugin';break}if(!tinyMCE.getParam("relative_urls"))pl.src=tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'],pl.src);embedHTML=TinyMCE_MediaPlugin._getEmbed(ci,cb,mt,pl,attribs)}else{switch(attribs['class']){case'mceItemFlash':s='writeFlash';break;case'mceItemShockWave':s='writeShockWave';break;case'mceItemWindowsMedia':s='writeWindowsMedia';break;case'mceItemQuickTime':s='writeQuickTime';break;case'mceItemRealMedia':s='writeRealMedia';break}if(attribs.width)at=at.replace(/width:[^0-9]?[0-9]+%?[^0-9]?/g,"width:'"+attribs.width+"'");if(attribs.height)at=at.replace(/height:[^0-9]?[0-9]+%?[^0-9]?/g,"height:'"+attribs.height+"'");if(!tinyMCE.getParam("relative_urls")){pl.src=tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'],pl.src);at=at.replace(new RegExp("src:'[^']*'","g"),"src:'"+pl.src+"'")}embedHTML=''}chunkBefore=content.substring(0,startPos);chunkAfter=content.substring(endPos);content=chunkBefore+embedHTML+chunkAfter}break}return content},handleNodeChange:function(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){if(node==null)return;do{if(node.nodeName=="IMG"&&/mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(tinyMCE.getAttrib(node,'class'))){tinyMCE.switchClass(editor_id+'_media','mceButtonSelected');return true}}while((node=node.parentNode));tinyMCE.switchClass(editor_id+'_media','mceButtonNormal');return true},_createImgFromEmbed:function(n,d,cl){var ne,at,i,ti='',an;ne=d.createElement('img');ne.src=tinyMCE.getParam("theme_href")+'/images/spacer.gif';ne.width=tinyMCE.getAttrib(n,'width');ne.height=tinyMCE.getAttrib(n,'height');ne.className=cl;at=n.attributes;for(i=0;i0?ti.substring(0,ti.length-1):ti;ne.title=ti;n.parentNode.replaceChild(ne,n)},_createImg:function(cl,d,n){var i,nl,ti="",an,av,al=new Array();ne=d.createElement('img');ne.src=tinyMCE.getParam("theme_href")+'/images/spacer.gif';ne.width=tinyMCE.getAttrib(n,'width');ne.height=tinyMCE.getAttrib(n,'height');ne.className=cl;al.id=tinyMCE.getAttrib(n,'id');al.name=tinyMCE.getAttrib(n,'name');al.width=tinyMCE.getAttrib(n,'width');al.height=tinyMCE.getAttrib(n,'height');al.bgcolor=tinyMCE.getAttrib(n,'bgcolor');al.align=tinyMCE.getAttrib(n,'align');al.class_name=tinyMCE.getAttrib(n,'mce_class');nl=n.getElementsByTagName('div');for(i=0;i0?ti.substring(0,ti.length-1):ti;ne.title=ti;return ne},_getEmbed:function(cls,cb,mt,p,at){var h='',n;p.width=at.width?at.width:p.width;p.height=at.height?at.height:p.height;h+='';if(n=='src'&&p[n].indexOf('://')!=-1&&mt=='application/x-mplayer2')h+=''}}h+=']*>\s*write(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)\(\{([^\)]*)\}\);\s*<\/script>/gi,'');content=content.replace(/]*)>/gi,'
');content=content.replace(/]*)>/gi,'
');content=content.replace(/<\/(object|embed)([^>]*)>/gi,'
');content=content.replace(/]*)>/gi,'
');content=content.replace(new RegExp('\\/ class="mceItemParam"><\\/div>','gi'),'class="mceItemParam">
');break;case"insert_to_editor_dom":d=inst.getDoc();nl=content.getElementsByTagName("img");for(i=0;i',startPos);attribs=TinyMCE_MediaPlugin._parseAttributes(content.substring(startPos+4,endPos));if(!/mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(attribs['class']))continue;endPos+=2;at=attribs['title'];if(at){at=at.replace(/&(#39|apos);/g,"'");at=at.replace(/&#quot;/g,'"');try{pl=eval('x={'+at+'};')}catch(ex){pl={}}}if(!tinyMCE.getParam('media_use_script',false)){switch(attribs['class']){case'mceItemFlash':ci='d27cdb6e-ae6d-11cf-96b8-444553540000';cb='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0';mt='application/x-shockwave-flash';break;case'mceItemShockWave':ci='166B1BCA-3F9C-11CF-8075-444553540000';cb='http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0';mt='application/x-director';break;case'mceItemWindowsMedia':ci=tinyMCE.getParam('media_wmp6_compatible')?'05589FA1-C356-11CE-BF01-00AA0055595A':'6BF52A52-394A-11D3-B153-00C04F79FAA6';cb='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701';mt='application/x-mplayer2';break;case'mceItemQuickTime':ci='02BF25D5-8C17-4B23-BC80-D3488ABDDC6B';cb='http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0';mt='video/quicktime';break;case'mceItemRealMedia':ci='CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA';cb='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0';mt='audio/x-pn-realaudio-plugin';break}if(!tinyMCE.getParam("relative_urls"))pl.src=tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'],pl.src);embedHTML=TinyMCE_MediaPlugin._getEmbed(ci,cb,mt,pl,attribs)}else{switch(attribs['class']){case'mceItemFlash':s='writeFlash';break;case'mceItemShockWave':s='writeShockWave';break;case'mceItemWindowsMedia':s='writeWindowsMedia';break;case'mceItemQuickTime':s='writeQuickTime';break;case'mceItemRealMedia':s='writeRealMedia';break}if(attribs.width)at=at.replace(/width:[^0-9]?[0-9]+%?[^0-9]?/g,"width:'"+attribs.width+"'");if(attribs.height)at=at.replace(/height:[^0-9]?[0-9]+%?[^0-9]?/g,"height:'"+attribs.height+"'");if(!tinyMCE.getParam("relative_urls")){pl.src=tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'],pl.src);at=at.replace(new RegExp("src:'[^']*'","g"),"src:'"+pl.src+"'")}embedHTML=''}chunkBefore=content.substring(0,startPos);chunkAfter=content.substring(endPos);content=chunkBefore+embedHTML+chunkAfter}break}return content},handleNodeChange:function(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){if(node==null)return;do{if(node.nodeName=="IMG"&&/mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(tinyMCE.getAttrib(node,'class'))){tinyMCE.switchClass(editor_id+'_media','mceButtonSelected');return true}}while((node=node.parentNode));tinyMCE.switchClass(editor_id+'_media','mceButtonNormal');return true},_createImgFromEmbed:function(n,d,cl){var ne,at,i,ti='',an;ne=d.createElement('img');ne.src=tinyMCE.getParam("theme_href")+'/images/spacer.gif';ne.width=tinyMCE.getAttrib(n,'width');ne.height=tinyMCE.getAttrib(n,'height');ne.className=cl;at=n.attributes;for(i=0;i0?ti.substring(0,ti.length-1):ti;ne.title=ti;n.parentNode.replaceChild(ne,n)},_createImg:function(cl,d,n){var i,nl,ti="",an,av,al=new Array();ne=d.createElement('img');ne.src=tinyMCE.getParam("theme_href")+'/images/spacer.gif';ne.width=tinyMCE.getAttrib(n,'width');ne.height=tinyMCE.getAttrib(n,'height');ne.className=cl;al.id=tinyMCE.getAttrib(n,'id');al.name=tinyMCE.getAttrib(n,'name');al.width=tinyMCE.getAttrib(n,'width');al.height=tinyMCE.getAttrib(n,'height');al.bgcolor=tinyMCE.getAttrib(n,'bgcolor');al.align=tinyMCE.getAttrib(n,'align');al.class_name=tinyMCE.getAttrib(n,'mce_class');nl=n.getElementsByTagName('div');for(i=0;i0?ti.substring(0,ti.length-1):ti;ne.title=ti;return ne},_getEmbed:function(cls,cb,mt,p,at){var h='',n;p.width=at.width?at.width:p.width;p.height=at.height?at.height:p.height;h+='';if(n=='src'&&p[n].indexOf('://')!=-1&&mt=='application/x-mplayer2')h+=''}}h+=''; // Add extra url parameter if it's an absolute URL on WMP diff --git a/program/js/tiny_mce/plugins/media/images/flash.gif b/program/js/tiny_mce/plugins/media/images/flash.gif old mode 100755 new mode 100644 diff --git a/program/js/tiny_mce/plugins/media/images/media.gif b/program/js/tiny_mce/plugins/media/images/media.gif old mode 100755 new mode 100644 diff --git a/program/js/tiny_mce/plugins/media/images/quicktime.gif b/program/js/tiny_mce/plugins/media/images/quicktime.gif old mode 100755 new mode 100644 diff --git a/program/js/tiny_mce/plugins/media/images/realmedia.gif b/program/js/tiny_mce/plugins/media/images/realmedia.gif old mode 100755 new mode 100644 diff --git a/program/js/tiny_mce/plugins/media/images/shockwave.gif b/program/js/tiny_mce/plugins/media/images/shockwave.gif old mode 100755 new mode 100644 diff --git a/program/js/tiny_mce/plugins/media/images/windowsmedia.gif b/program/js/tiny_mce/plugins/media/images/windowsmedia.gif old mode 100755 new mode 100644 diff --git a/program/js/tiny_mce/plugins/media/jscripts/embed.js b/program/js/tiny_mce/plugins/media/jscripts/embed.js old mode 100755 new mode 100644 diff --git a/program/js/tiny_mce/plugins/media/jscripts/media.js b/program/js/tiny_mce/plugins/media/jscripts/media.js old mode 100755 new mode 100644 index 44b68fa4d..691a8bdbd --- a/program/js/tiny_mce/plugins/media/jscripts/media.js +++ b/program/js/tiny_mce/plugins/media/jscripts/media.js @@ -209,7 +209,7 @@ function insertMedia() { break; } - if (fe.width != f.width.value || fe.height != f.width.height) + if (fe.width != f.width.value || fe.height != f.height.height) tinyMCE.selectedInstance.repaint(); fe.title = serializeParameters(); @@ -275,7 +275,25 @@ function getMediaListHTML() { } function getType(v) { - var fo = tinyMCE.getParam("media_types", "flash=swf;shockwave=dcr;qt=mov,qt,mpg,mp3,mp4,mpeg;shockwave=dcr;wmp=avi,wmv,wm,asf,asx,wmx,wvx;rmp=rm,ra,ram").split(';'), i, c, el, x; + var fo, i, c, el, x, f = document.forms[0]; + + fo = tinyMCE.getParam("media_types", "flash=swf;shockwave=dcr;qt=mov,qt,mpg,mp3,mp4,mpeg;shockwave=dcr;wmp=avi,wmv,wm,asf,asx,wmx,wvx;rmp=rm,ra,ram").split(';'); + + // YouTube + if (v.indexOf('http://www.youtube.com/watch?v=') == 0) { + f.width.value = '425'; + f.height.value = '350'; + f.src.value = 'http://www.youtube.com/v/' + v.substring('http://www.youtube.com/watch?v='.length); + return 'flash'; + } + + // Google video + if (v.indexOf('http://video.google.com/videoplay?docid=') == 0) { + f.width.value = '425'; + f.height.value = '326'; + f.src.value = 'http://video.google.com/googleplayer.swf?docId=' + v.substring('http://video.google.com/videoplay?docid='.length) + '&hl=en'; + return 'flash'; + } for (i=0; i - +
diff --git a/program/js/tiny_mce/plugins/nonbreaking/editor_plugin.js b/program/js/tiny_mce/plugins/nonbreaking/editor_plugin.js old mode 100755 new mode 100644 diff --git a/program/js/tiny_mce/plugins/nonbreaking/editor_plugin_src.js b/program/js/tiny_mce/plugins/nonbreaking/editor_plugin_src.js old mode 100755 new mode 100644 diff --git a/program/js/tiny_mce/plugins/nonbreaking/images/nonbreaking.gif b/program/js/tiny_mce/plugins/nonbreaking/images/nonbreaking.gif old mode 100755 new mode 100644 diff --git a/program/js/tiny_mce/plugins/nonbreaking/langs/en.js b/program/js/tiny_mce/plugins/nonbreaking/langs/en.js old mode 100755 new mode 100644 diff --git a/program/js/tiny_mce/plugins/searchreplace/css/searchreplace.css b/program/js/tiny_mce/plugins/searchreplace/css/searchreplace.css old mode 100755 new mode 100644 diff --git a/program/js/tiny_mce/plugins/searchreplace/images/replace_all_button_bg.gif b/program/js/tiny_mce/plugins/searchreplace/images/replace_all_button_bg.gif old mode 100755 new mode 100644 diff --git a/program/js/tiny_mce/plugins/searchreplace/images/replace_button_bg.gif b/program/js/tiny_mce/plugins/searchreplace/images/replace_button_bg.gif old mode 100755 new mode 100644 diff --git a/program/js/tiny_mce/plugins/searchreplace/jscripts/searchreplace.js b/program/js/tiny_mce/plugins/searchreplace/jscripts/searchreplace.js old mode 100755 new mode 100644 diff --git a/program/js/tiny_mce/plugins/searchreplace/searchreplace.htm b/program/js/tiny_mce/plugins/searchreplace/searchreplace.htm old mode 100755 new mode 100644 diff --git a/program/js/tiny_mce/plugins/spellchecker/classes/TinyGoogleSpell.class.php b/program/js/tiny_mce/plugins/spellchecker/classes/TinyGoogleSpell.class.php index 33e7b1cc1..7be929731 100644 --- a/program/js/tiny_mce/plugins/spellchecker/classes/TinyGoogleSpell.class.php +++ b/program/js/tiny_mce/plugins/spellchecker/classes/TinyGoogleSpell.class.php @@ -1,4 +1,5 @@ lang = $lang; + $this->spellurl = $config['googlespell.url']; } // Returns array with bad words or false if failed. function checkWords($word_array) { - $words = array(); + $words = array (); $wordstr = implode(' ', $word_array); $matches = $this->_getMatches($wordstr); - for ($i=0; $iunhtmlentities(mb_substr($wordstr, $matches[$i][1], $matches[$i][2], "UTF-8")); return $words; @@ -37,7 +40,7 @@ class TinyGoogleSpell { // Returns array with suggestions or false if failed. function getSuggestion($word) { - $sug = array(); + $sug = array (); $matches = $this->_getMatches($word); @@ -48,43 +51,41 @@ class TinyGoogleSpell { } function _xmlChars($string) { - $trans = get_html_translation_table(HTML_ENTITIES, ENT_QUOTES); - - foreach ($trans as $k => $v) - $trans[$k] = "&#".ord($k).";"; + $trans = get_html_translation_table(HTML_ENTITIES, ENT_QUOTES); + + foreach ($trans as $k => $v) + $trans[$k] = "&#" . ord($k) . ";"; - return strtr($string, $trans); + return strtr($string, $trans); } function _getMatches($word_list) { - $server = "www.google.com"; - $port = 443; - $path = "/tbproxy/spell?lang=" . $this->lang . "&hl=en"; - $host = "www.google.com"; - $url = "https://" . $server; + $url = $this->spellurl . "&" . $this->lang; + + $path = preg_replace("/^https?:\/\//i", "", $url); // Setup XML request - $xml = '' . $word_list . ''; - - $header = "POST ".$path." HTTP/1.0 \r\n"; - $header .= "MIME-Version: 1.0 \r\n"; - $header .= "Content-type: application/PTI26 \r\n"; - $header .= "Content-length: ".strlen($xml)." \r\n"; - $header .= "Content-transfer-encoding: text \r\n"; - $header .= "Request-number: 1 \r\n"; - $header .= "Document-type: Request \r\n"; - $header .= "Interface-Version: Test 1.4 \r\n"; - $header .= "Connection: close \r\n\r\n"; - $header .= $xml; + $xml = '' . $word_list . ''; + + $header = "POST " . $path . " HTTP/1.0 \r\n"; + $header .= "MIME-Version: 1.0 \r\n"; + $header .= "Content-type: application/PTI26 \r\n"; + $header .= "Content-length: " . strlen($xml) . " \r\n"; + $header .= "Content-transfer-encoding: text \r\n"; + $header .= "Request-number: 1 \r\n"; + $header .= "Document-type: Request \r\n"; + $header .= "Interface-Version: Test 1.4 \r\n"; + $header .= "Connection: close \r\n\r\n"; + $header .= $xml; //$this->_debugData($xml); - $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL,$url); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); - curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $header); - curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); - $xml = curl_exec($ch); - curl_close($ch); + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, $url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $header); + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); + $xml = curl_exec($ch); + curl_close($ch); //$this->_debugData($xml); @@ -95,13 +96,12 @@ class TinyGoogleSpell { } function _debugData($data) { - $fh = @fopen("debug.log", 'a+'); - @fwrite($fh, $data); - @fclose($fh); + $fh = @ fopen("debug.log", 'a+'); + @ fwrite($fh, $data); + @ fclose($fh); } } // Setup classname, should be the same as the name of the spellchecker class $spellCheckerConfig['class'] = "TinyGoogleSpell"; - ?> diff --git a/program/js/tiny_mce/plugins/spellchecker/config.php b/program/js/tiny_mce/plugins/spellchecker/config.php index f008d11ca..6622248c0 100644 --- a/program/js/tiny_mce/plugins/spellchecker/config.php +++ b/program/js/tiny_mce/plugins/spellchecker/config.php @@ -21,4 +21,6 @@ // Pspell shell specific settings $spellCheckerConfig['tinypspellshell.aspell'] = '/usr/bin/aspell'; $spellCheckerConfig['tinypspellshell.tmp'] = '/tmp'; -?> + + $spellCheckerConfig['googlespell.url'] = 'https://www.google.com/tbproxy/spell?hl=en' +?> \ No newline at end of file diff --git a/program/js/tiny_mce/plugins/table/images/buttons.gif b/program/js/tiny_mce/plugins/table/images/buttons.gif index 8c09ff952..56a7396b8 100644 Binary files a/program/js/tiny_mce/plugins/table/images/buttons.gif and b/program/js/tiny_mce/plugins/table/images/buttons.gif differ diff --git a/program/js/tiny_mce/plugins/table/images/table_delete_col.gif b/program/js/tiny_mce/plugins/table/images/table_delete_col.gif index 91f53af02..260aa04ca 100644 Binary files a/program/js/tiny_mce/plugins/table/images/table_delete_col.gif and b/program/js/tiny_mce/plugins/table/images/table_delete_col.gif differ diff --git a/program/js/tiny_mce/plugins/table/images/table_delete_row.gif b/program/js/tiny_mce/plugins/table/images/table_delete_row.gif index 7025733fe..2fb5f2bab 100644 Binary files a/program/js/tiny_mce/plugins/table/images/table_delete_row.gif and b/program/js/tiny_mce/plugins/table/images/table_delete_row.gif differ diff --git a/program/js/tiny_mce/plugins/table/langs/en.js b/program/js/tiny_mce/plugins/table/langs/en.js index 7597b3c21..e2fbba2e5 100644 --- a/program/js/tiny_mce/plugins/table/langs/en.js +++ b/program/js/tiny_mce/plugins/table/langs/en.js @@ -38,7 +38,7 @@ props_desc : 'Table properties', bordercolor : 'Border color', bgcolor : 'Background color', merge_cells_title : 'Merge table cells', -split_cells_desc : 'Split table cells', +split_cells_desc : 'Split merged table cells', merge_cells_desc : 'Merge table cells', cut_row_desc : 'Cut table row', copy_row_desc : 'Copy table row', diff --git a/program/js/tiny_mce/plugins/visualchars/editor_plugin.js b/program/js/tiny_mce/plugins/visualchars/editor_plugin.js old mode 100755 new mode 100644 diff --git a/program/js/tiny_mce/plugins/visualchars/editor_plugin_src.js b/program/js/tiny_mce/plugins/visualchars/editor_plugin_src.js old mode 100755 new mode 100644 diff --git a/program/js/tiny_mce/plugins/visualchars/images/visualchars.gif b/program/js/tiny_mce/plugins/visualchars/images/visualchars.gif old mode 100755 new mode 100644 diff --git a/program/js/tiny_mce/plugins/visualchars/langs/en.js b/program/js/tiny_mce/plugins/visualchars/langs/en.js old mode 100755 new mode 100644 -- cgit v1.2.3